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!
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!
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
In the same screen click on the Targets
tab and click Edit
Fill out the form as shown below following these steps:
Add to registered
buttonSave
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
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
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