Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API Gateway with Static Elastic IP

Hi We have an aws API gateway configured with lambda and now want to integrate with a vendor wherein vendor want us to provide him with a Static IP against the API Gateway that we have. As per my knowledge API gateway serves request through Dynamic Elastic IP which are listed here

Is there a way to achieve this other than putting a forward proxy or NLB.

like image 447
Shailesh Sutar Avatar asked Mar 02 '23 19:03

Shailesh Sutar


2 Answers

You cannot get a static IP if you are using a public API Gateway endpoint (Regional or Edge-optimized). The IPs allocated for APIs in any AWS region can be changed at any time and are a very wide range.

However, if you were to use a private API Gateway endpoint, you could use the below set up -

Client --> NLB(public static IP) --> VPC endpoint for API Gateway --> Private API

The execute-api VPC endpoint have a fixed IP address allocated from the VPC CIDR range. Having a NLB as a front-end(with a public static IP), you can add these IP addresses as targets in your NLB config.

like image 188
Suraj Bhatia Avatar answered Mar 11 '23 20:03

Suraj Bhatia


You can also use a static IP proxy service such as QuotaGuard. I use that to deal with services that want to whitelist my IP when using dynamic DNS.

like image 44
cyberwombat Avatar answered Mar 11 '23 20:03

cyberwombat