I am created an infra using API Gateway --> Route 53 --> ALB --> ECS Farate --> Aurora Postgress RDS.
The Application created in Java is working fine using Postname, though when i hit the service from API Gateway -> resources --> Test API, i'm getting "502 Bad gateway" at ALB i suppose.
Current Analysis;
- Security groups at ALB , ECS and RDS has all Traffic allowed, and also pointing in respecting services IP address.
- ALB has listener on https: 443 port and target at ECS container http:80, Assigned to Public Subnet
- by directly hitting ALB DNS : Error 502 BAD Gateway is coming.
- The ECS task definition has Public IP enabled but getting error: Gateway Timeout, ECS is assigned to Private subnet.
- I've also tried calling Lambda function from ALB which works fine.
Not sure what I'm missing here. Any suggestion would be very much appreciated.
I am trying to atleast hit one basic API from ALB to ECS