- Newest
- Most votes
- Most comments
The port on your listener is the port that's exposed to the Internet, in your case that's port 82. So you can call something like http://my-alb.com:82 The target port of the listener target group must then match the host port of your container. In your case, the target port is 82 but the host port is 80, which means the ALB is trying to communicate with your target on the wrong port. Listener port and the port of the target group on the other hand don't need to match. So what you can do is:
Listener port: 82 Target port: 80 Host port: 80
Also consider that if you have a standard application that uses HTTP or HTTPS, you should generally use the standard ports 80 and 443, respectively, as entry point to your application. You can send all traffic to the same listener (i.e. the same port) on your ALB, and then forward traffic to the different target groups based on listener rules. This way, your targets all can serve requests on the same port.
Relevant content
- asked 9 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
Thank you for your answer.