AWS Lambda different IP address for each Lambda

后端 未结 2 1266
误落风尘
误落风尘 2021-02-14 08:00

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 ac

相关标签:
2条回答
  • 2021-02-14 08:41

    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.

    0 讨论(0)
  • 2021-02-14 08:43

    When you redeploy the lambda it seems to use a new container. So you can automate this deploy process using awscli to get a new ip on command.

    0 讨论(0)
提交回复
热议问题