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.
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.
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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With