amazon-web-servicesaws-api-gatewayamazon-elbaws-application-load-balancer

How do I set up an AWS Application Load Balancer in front of an AWS API Gateway


I have two services that handle a series of HTTP endpoints. Service1's endpoints all start with /someValue Service2's endpoints all start with /anotherValue

Each service is fronted by a different API Gateway. Additionally, those two services must be accessible using the same domain name. So the idea I have been experimenting with is to have: Route53 point the domain name to an ALB which in turn will direct the requests to the appropriate Target Group (by reading the start of the path) pointing to the correct API Gateway.

My problem is that I do not know how to create a Target Group that points to an API Gateway. The only options I see are:

What am I missing?

I tried pointing the target group to the "IP Addresses", hoping that I could provide the URL of my API Gateway APIs but that was not allowed.

The other options clearly are not what I need here.

Many of the other questions in Stack Overflow (and generally on the Internet) address having API Gateway in front of the Load Balancer; we need the ALB in front of the API Gateway.


Solution

  • There are two options I see: