AWS LoadBalancer to Listen on multiple ports

Question:

I have a few applications running as Microservices in aws. Some of them are running on port 80 and some of them are running on port 3000. I want my ALB to listen to traffic on both ports. Then I have a ListenRules to direct the traffic to Microservices. I want to achieve something like below,

Answer:

The Listener should be repeated with each port that is to be opened. For example:

This also allows the flexibility of setting different protocols (e.g. HTTPS) or target groups for each port.

Leave a Reply