本文介绍了如何确保每个AWS Lambda拥有独特的公共IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个可公开访问的AWS Lambda实例,从互联网上,他们都有相同的公共IP,我们如何确保每个Lambda具有不同的公用IP地址?它不必是静态的,每个Lambda只需不同,并且如果同一个Lambda具有不同的IP(高可用性)就没有问题.),唯一的条件是2个不同的Lambda永远不会拥有相同的IP ...

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...

推荐答案

查看以下问题的答案(和评论):

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

您可以通过为弹性IP启用VPC,然后确保将VPC配置正确以允许您的Lambda Internet访问(通过将NAT网关附加到VPC子网的路由表,或通过以下方式,将弹性IP分配给lambda功能):为lambda的ENI分配IP).

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).

这篇关于如何确保每个AWS Lambda拥有独特的公共IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 07:12