AWS Fargate cannot access application over Public DNS name

Viewed 787

This is a follow up to my previous question. I'm successfully able to access the public IP over fargate. However, after trying to attach Application load balancer, I cannot access application over public DNS. The registered target always show unhealthy status with 502 error.

Sharing my configuration settings-

VPC VPC Route Table Public Subnet Route Table Public Subnet Route Table public subnet config Route Table public subnet config Route Table private subnet Route Table private subnet Route Table private subnet config Route Table private subnet config ACL subnet associations ACL subnet associations ACL inbound rules ACL inbound rules ACL outbound rules ACL outbound rules security inbound rules security inbound rules security outbound rules security outbound rules internet gateway internet gateway nat gateway nat gateway target group target group target group health status target group health status task details task details service service ALB settings ALB ALB listeners ALB listeners Target group with 8081 port Target group with 8081 port

1 Answers

Based on the comments.

There were two issues identified:

  1. Incorrect port on the target group. It was 80 instead of 8081.
  2. Healthy threshold timeout was too short (5 seconds). Increasing it seemed to solved the issue.
Related