0

Can AWS ELB redirect traffic from one port to another? Take this example - I have an application running on 8445 but I only want to expose port 443. I have tried this with target groups and listeners but no joy.

Thanks!

Bladerider1
  • 1
  • 1
  • 1

1 Answers1

1

To setup an ELB to listen on a port (443 in your case) and redirect to a target group using a different port (8445) is straight forward and well documented.

Step 1 Create a Target Group

In the EC2 GUI click on Target Groups --> Create Target Groups

Fill in the form as shown below and Create

enter image description here

In the same screen click on the Targets tab and click Edit

Fill out the form as shown below following these steps:

  1. Click the target host box(ex) you want load balanced
  2. Click Add to registered button
  3. Click Save

enter image description here

Step 2 - Create a Load Balancer and attach Target

In the EC2 GUI click on Load Balancers --> Create Load Balancer
Next select the type of LB you want. In this example I chose Network Load Balancer

Give it a name and fill in the form as below. Next, choose the Load Balancer Protocol (most likely TLS(secure TCP) If this is externally facing the availability zones you select should be public. When complete click Configure Security Settings

enter image description here

Next Step is to select and/or upload the certificate you'll be using for TLS.

After that you'll Configure Routing. Chose an Existing Target Group and pick the group you created in Step 1 above. When complete click on Next: Register Targets

enter image description here

The Register Targets screen should show the targets you registered in Step 1. To proceed click Review then click Create

NOTE: The target host(s) you selected should allow the ELB access to the port you selected on the host security group, in this case port 8445.

If you did all these steps and it's still not working, please supply more details on how it's not working and we can troubleshoot that.

References

Network Load Balancers

kenlukas
  • 3,101
  • 2
  • 16
  • 26