FULL AI ANALYSIS

AWS Lambda cold-start timeouts for VPC-enabled Node.js functions caused by ENI allocation delays

Generated Oct 24, 2026, 9:21:01 AM

Analysis summary

Primary cause: when a Lambda configured for VPC needs a new execution environment, AWS must attach/prepare ENIs in the configured subnets which introduces seconds of latency. Using provisioned concurrency keeps execution environments (and ENIs) warm, eliminating ENI setup delay; removing the need for a VPC (or avoiding direct DB access) also eliminates the ENI overhead. Less likely causes are subnet IP exhaustion or NAT gateway saturation; those would show resource alarms, which are not observed here. Evidence: non‑VPC functions do not show delay and provisioned concurrency reduces the issue.

Possible causes

ENI creation/attachment for VPC-enabled Lambda cold starts

90%

Subnet IP capacity or cross-AZ provisioning constraints causing delayed ENI allocation

40%

NAT gateway or VPC endpoint saturation introducing slowness during init

30%

IAM/API throttling delaying ENI / Lambda platform operations

20%

Suggested fixes

1

Diagnostic step 1

Short term: enable provisioned concurrency for latency-sensitive functions (keeps ENIs warm).

2

Diagnostic step 2

Medium term: remove Lambda from VPC where possible; use RDS Proxy, AWS PrivateLink, or a network-facing microservice inside the VPC that Lambdas call to avoid per-function ENI creation.

3

Diagnostic step 3

Validate subnets have ample available IPs across AZs and ensure NAT gateway/ENI quotas aren't being hit (AWS Console VPC metrics).

4

Diagnostic step 4

Measure impact: create a canary that invokes cold starts and compare cold-start latency before/after changes; verify CloudWatch logs show reduced ENI-attachment time.

5

Diagnostic step 5

If cost is a concern, use provisioned concurrency for only the critical subset of functions and keep others on-demand.