每个Lambda的AWS Lambda不同的IP地址 [英] AWS Lambda different IP address for each Lambda

查看:343
本文介绍了每个Lambda的AWS Lambda不同的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以让每个Lambda从不同的IP地址访问互联网?在我的测试中,每次调用Lambda时,它都使用相同的IP地址访问我们的服务器时,它似乎出现了.

Is it possible to have each Lambda access the internet from a different IP address? In my testing, it appears the each time a Lambda is invoked it uses the same IP address to access our servers.

我们的Lambda没有VPC访问权限,也没有NAT.我想我们将通过此设置获得不同的IP地址,但事实并非如此.

Our Lambdas do not have VPC access and are not NAT'd. I would think we would get different IP addresses with this setup but that doesn't seem to be the case.

我想知道是否有可能因为我们的容量太小而总是使用相同的容器并因此使用相同的IP地址?如果是这样,有什么方法可以防止这种情况发生?

I am wondering if it's possible that our because our volume is low we just always end up using the same container hence the same IP address? If so is there any way to prevent this?

推荐答案

我想知道是否有可能因为我们的容量太小而总是使用相同的容器并因此使用相同的IP地址?

I am wondering if it's possible that our because our volume is low we just always end up using the same container hence the same IP address?

是的,这就是原因.仅当尚无可用容器时才产生一个容器.在没有更多需求的几分钟之后,多余/不需要的容器被销毁.

Yes, that is exactly the reason. A container is only spawned if no containers are already available. After a few minutes of no further demand, excess/unneeded containers are destroyed.

如果可以的话,有什么方法可以防止这种情况?

If so is there any way to prevent this?

不,这种行为是设计使然.

No, this behavior is by design.

这篇关于每个Lambda的AWS Lambda不同的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆