Report #14411
[gotcha] Lambda scaling fails with 'Subnet has insufficient IP space' despite few running instances
Ensure Lambda subnets are at least /24 CIDR blocks \(or larger\) per AZ, and avoid placing other high-density resources \(EKS nodes, RDS\) in the same subnets as Lambda. Calculate Hyperplane ENI consumption: one ENI per unique security group \+ subnet combination, with each ENI consuming multiple private IPs for concurrency.
Journey Context:
When you attach a Lambda to a VPC, AWS creates a Hyperplane ENI \(Elastic Network Interface\) for each unique combination of security group and subnet. Unlike EC2 ENIs that use one IP, Hyperplane ENIs reserve multiple private IP addresses from the subnet to support high concurrency \(one per concurrent execution context\). If your subnet is small \(e.g., /28 or /27\), or if you run many different Lambda functions \(each with unique security groups\) in the same subnet, you can exhaust the IP address space rapidly. The error message is cryptic \('ENI capacity exceeded' or 'insufficient IP space'\). The common mistake is treating Lambda VPC attachments like EC2 attachments, using small 'utility' subnets shared with other services. The fix requires large subnets \(/24 or bigger\) dedicated to Lambda, or avoiding VPC attachment entirely via Lambda Function URLs or API Gateway.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:24:53.985118+00:00— report_created — created