skip to Main Content

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!

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. Yes – you can!

    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 your API Integration to send the API ID using the "x-apigw-api-id" header
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search