Create static IP for Google Places API keys restrictions on AWS Elasticbeanstalk with autoscaling
Asked Answered
A

0

4

I use Google Places API, and I need to put a restriction on my API keys, more specifically an IP restriction because the calls are from a web server.

I am using AWS Elastic Beanstalk with an environment where I have a Load Balancer, Autoscaling, and a VPC. So the IP address changes every time a new EC2 server is created.

My question is : How do I put a static IP (Elastic ?) on my environment?

I have found many similar posts like this one (https://mcmap.net/q/477110/-static-ip-using-elastic-beanstalk) or this one (https://medium.com/@obezuk/how-to-use-elastic-beanstalk-with-an-ip-whitelisted-api-69a6f8b5f844) where I have to create a NAT Gateway. But it requires at the end to type a target IP address, and unfortunately, Google API servers IPs are not static.

How can I use NAT Gateway or is there another way ?

Thanks

Alcinia answered 8/10, 2018 at 7:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.