I am using ECS Fargate model.I have two task defination and in each defination i have one service running (have place 1 container in each TD) Then i have two ECS services which run these two task definations. Network mode used is fargate.
I have created a load balancer which has two target groups.I have defined rules to divert traffic. In target groups i have added IP's of the services running inside two task definitions (as network mode is awsvpc i got ENI)
I have seen for one of the target group health check is failing continuously with HTTP code 502. I am observing the IP from ENI for that service changing continuously and same is updated in target group.
Questions:
Does ECS change IP in target group automatically ?
How to troubleshoot this HTTP code 502 as this is fargate i even cannot login inside container ?