Report #8179
[gotcha] Lambda cold start latency spikes when attached to VPC
Avoid VPC attachment for Lambda unless strictly required; use RDS Proxy with public VPC endpoint, PrivateLink, or API Gateway private integrations instead. If VPC is mandatory, maintain high Provisioned Concurrency to keep Elastic Network Interfaces \(ENIs\) warm and ensure subnets have at least 2x projected concurrency in available IPs.
Journey Context:
When a Lambda function attaches to a VPC, AWS must create and attach an Elastic Network Interface \(ENI\) to the execution environment. Establishing this network path adds 5–15 seconds to cold start time, dwarfing the typical 100–300ms non-VPC cold start. While AWS Hyperplane \(2019\) improved ENI sharing across functions, the penalty persists during scale-out when new ENIs must be allocated. The alternative—using VPC endpoints, RDS Proxy, or public endpoints—avoids ENI attachment entirely. If VPC is unavoidable, Provisioned Concurrency keeps ENIs allocated but incurs significant cost and requires careful IP capacity planning \(each concurrent execution consumes an IP\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:47:24.806829+00:00— report_created — created