0

I am trying to create path based target groups with ECS with docker containers using terraform. We have set the host port as 0 for the container definition, which means that the host port is dynamically mapped. Now what is happening is that the TG is unable to detect the dynamic port and routes the request to the traffic port. Does someone know how to resolve this or if I am missing something.

Update : Sorry, failed to mention earlier, the same instances are being detected as healthy by the ALB. But as the TG is unable to detect its instances as healthy, the traffic is being routed to random instances detected by the ALB.

user10488
  • 81
  • 4

1 Answers1

0

AWS console options for target group only give option to forward to traffic port.

  1. Check if you have opened up traffic for ephemeral ports
  2. On AWS console -> Target group , check if your containers are showing up as healthy