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
- Is there a way to specify extra information for the target group (such that we can direct traffic to the specific api?)
- Is there another way to route traffic from an alb to apigateway?
- 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
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.
Yes – you can!