Request Timeout ( HTTP 408) : loadbalancer backed by ecs-fargate with nginx image

Viewed 370

I am trying to create following infrastructure using terraform. LoadBalancer -> ECS-Service -> Fargate (nginx images, count=2)

After applying terraform plan, I can see that a target groups shows two healthy targets. But when i try to access loadbalancer dns name from browser, I am getting request-timeout. Ping is also not working for lb dns name.

Loadbalancer is an non-internal application loadbalancer with security-group allowing all traffic on 80 port to all IPv4.

Need help.

1 Answers

Did you configure LB in the public subnet? seems like it's in a private subnet, and did you tried to access the application from aws network to verify the LB working inside AWS VPC network?

curl lb_dns 

or

nslookup lb_dns

from any ec2 machine within the VPC if that worked, its mean the LB in only reachable with in private subnet, move LB to public subnet and should work.

Related