Search code examples
amazon-web-servicesamazon-ec2

How to forward port in AWS Application load balancer (ALB) port forwarding


Is it possible to have an application running on an EC2 instance and have a load balancer listen on port 80 but proxy it to the instances port 8080?

I cannot seem to get this to work. What setting to I need to change. I am running the cluster behind an application load balancer.


Solution

  • Adding answer with AWS management snippets .

    Add the instance port in the target group, refer below image for it. for example i've added tomcat 8080 port to the target group port/

    enter image description here

    Make sure that your ELB is internet facing. refer below image of ELB summary , which says that my ELB is internet -facing. and check that your routing is properly added.

    enter image description here