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

雨燕双飞 提交于 2019-12-11 04:15:43

问题


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://stackoverflow.com/a/49200693/3954420) 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

来源:https://stackoverflow.com/questions/52697134/create-static-ip-for-google-places-api-keys-restrictions-on-aws-elasticbeanstalk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!