AWS ALB 502 Bad gateway

35 views Asked by At

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;

  1. Security groups at ALB , ECS and RDS has all Traffic allowed, and also pointing in respecting services IP address.
  2. ALB has listener on https: 443 port and target at ECS container http:80, Assigned to Public Subnet
  3. by directly hitting ALB DNS : Error 502 BAD Gateway is coming.
  4. The ECS task definition has Public IP enabled but getting error: Gateway Timeout, ECS is assigned to Private subnet.
  5. 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

0

There are 0 answers