When does AWS Lambda create ENI?

976 Views Asked by At

I know lambda will create ENI (which in turn will create a longer cold start) if it wants to access resources in VPC. However, I wish to know when does the lambda function create ENI?

Is it on the container's initialization? (which the developer has no control of)

or is it when we start a connection (running db.Connect() or something like it) with other resources e.g. RDS

1

There are 1 best solutions below

2
On

ENI create every cold start.

https://docs.aws.amazon.com/lambda/latest/dg/vpc.html

When a Lambda function is configured to run within a VPC, it incurs an additional ENI start-up penalty. This means address resolution may be delayed when trying to connect to network resources.