AWS: Error 504 in communication between ALB internet-facing and ALB internal

82 Views Asked by At

I'm trying to create a structure in AWS with ECS so that an internet-facing ALB manages traffic to front-end containers and front-end requests go through an internal ALB that forwards to containers with API, but requests to the API are dying in 504.

the ALB facing the internet is configured with listeners that take the host header and forward it to each front, this part is working normally, I did the same for the internal ALB but forwarding it to the API, the containers with API pass the health check, then the service is OK

diagram: Cluster Architecture with ALB

General structure:

  • VPC
  • 2 subnets (public and private)
  • Internet-facing ALB (with Internet access)
  • Internal ALB (inbound rule for VPC only)
  • SG on the fronts releasing port for ALB facing the internet
  • SG API releasing ports for the internal ALB
  • Target groups for each ECS service

If I'm missing any relevant information, I can let you know, thank you in advance!

When I created everything within the same ALB internet-facing works normally

0

There are 0 best solutions below