1

Goal:

I would like to route from an application load balancer to an apigateway api. I found an article that suggested that this was possible by attaching a vpce to the apigateway instance and then creating a target group of the vpce ip addresses. I have followed all of the instructions (except for the step that involves creating a route 53 alias and a global accelerator).

I am confused on how the alb would route to the specific apigatway api, especially if the vpce has multiple apis attached.

Extra Context / Parameter

  • would like the apigatway to be private
  • would like the alb to be internal

Resources:

I am trying to follow along this guide: https://aws.amazon.com/blogs/networking-and-content-delivery/accessing-an-aws-api-gateway-via-static-ip-addresses-provided-by-aws-global-accelerator/

Questions

  1. Is there a way to specify extra information for the target group (such that we can direct traffic to the specific api?)
  2. Is there another way to route traffic from an alb to apigateway?
  3. can anyone explain to me how the alb is routing traffic through the vpce to the specific api? https://aws.amazon.com/blogs/networking-and-content-delivery/accessing-an-aws-api-gateway-via-static-ip-addresses-provided-by-aws-global-accelerator/

Thanks!

Sarah Ganci
  • 209
  • 1
  • 10

2 Answers2

0

The other key part of this is the creation of a custom domain within apigateway.

Basically the vpce "knows" which api to forward the traffic to because the domain of the original request matches the custom apigateway domain.

Sarah Ganci
  • 209
  • 1
  • 10
0

Yes - you can! https://aws.amazon.com/blogs/networking-and-content-delivery/accessing-an-aws-api-gateway-via-static-ip-addresses-provided-by-aws-global-accelerator/

  1. Make your API private
  2. Add a PrivateLink Endpoint
  3. Setup your ALB to point to the various IPs of your PrivateEndpoint
  4. Setup the ALB to accept 403 status code as OK for your healthcheck
  5. Setup your API Integration to send the API ID using the x-apigw-api-id HTTP header
victor m
  • 2,012
  • 2
  • 14
  • 23