I have a task to configure API Gateway to route traffic to Lambda or to Load Balancer(internal, under VPC). I thought that it would be possible to create simple integration for ALB using simple HTTP integration or AWS Service. But after some time of googling I found only one solution - is to configure NLB and then use VPC_Link integration. In this case everything looks like working.
But still I found some articles like this one where people describe how they can integrate Api Gateway and LB without VPC_links. In my case I always see invalid endpoint address
error when integrate my internal ALB with my apigateway. I suppose that this works only for public resources(internet facing LBs)?
And second part of question. When I configured VPC_link I still need to provide some endpoint in integration for certificate checks and something else. But looks like this endpoint still must be publicly accessible? The problem is that my service under ALB have multiple endpoints and I need to provide Path to this endpoints in this Endpoint URL
and this endpoint should be public as I see right now. So for test reasons I provided url of our public resource and path of endpoint that I need to execute. And this works but looks too ugly for me. May be there is any pretty solution.
Additional features provided by API GatewayThe request routing based on endpoint rules can also be supported by ALB, especially when paired with Lambda functions.
There must be a load balancer for the API gateway that can adapt to changes in microservices, such as versioning and dynamic scaling.
Pricing. Also, as we discussed previously, ALBs rule when it comes to cost at scale. API Gateway is more affordable than ALB for up to around 500,000 monthly transactions. But at larger scales, API Gateway's costs quickly accumulate, and ALB becomes the much more affordable solution.
The answer marked as correct is outdated. It is now possible to integrate API Gateway with an internal facing ALB through HTTP private integration using VPC Link. See https://stackoverflow.com/a/67413951/2948212 for a step by step configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With