how to ensure distinct public ip per aws lambda

狂风中的少年 提交于 2021-01-28 02:00:40

问题


I have several aws lambda instances accessible publicly, from the internet they all have the same public ip, how can we ensure that each lambda has distinct public IP address? It does not need to be static, it only needs to be different per lambda, and its no problem if same lambda has different IPs (high availability), the only condition is that 2 different lambdas never have the same IP...


回答1:


Look at the answer (and the comments) to this question: Lambda function within VPC doesn't have access to public Internet

You can "assign" an Elastic IP to a lambda function by enabling VPC for it and then making sure the VPC is configured properly to give your lambda internet access (by attaching a NAT Gateway to the VPC subnet's routing table, or by assigning an IP to the lambda's ENI).



来源:https://stackoverflow.com/questions/53203573/how-to-ensure-distinct-public-ip-per-aws-lambda

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