# Insufficient IP addresses in subnet: The subnet does not have enough free IP addresses to support the requested number of ENIs.

- **ID:** `aws/ec2-insufficient-ip-addresses`
- **Domain:** aws
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

The VPC subnet has exhausted its available IP address space, preventing new ENIs or EC2 instances from launching.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| EC2 API 2016-11-15 | active | — | — |
| AWS VPC CNI 1.12.0 | active | — | — |

## Workarounds

1. **Release unused ENIs: list ENIs with `aws ec2 describe-network-interfaces --filters Name=subnet-id,Values=subnet-xxx` and delete unattached ones with `aws ec2 delete-network-interface --network-interface-id eni-xxx`.** (80% success)
   ```
   Release unused ENIs: list ENIs with `aws ec2 describe-network-interfaces --filters Name=subnet-id,Values=subnet-xxx` and delete unattached ones with `aws ec2 delete-network-interface --network-interface-id eni-xxx`.
   ```
2. **Create additional subnets in the same VPC with a larger or additional CIDR block. Add a secondary CIDR to VPC: `aws ec2 associate-vpc-cidr-block --vpc-id vpc-xxx --cidr-block 10.0.2.0/24`. Then create new subnets from the new range.** (85% success)
   ```
   Create additional subnets in the same VPC with a larger or additional CIDR block. Add a secondary CIDR to VPC: `aws ec2 associate-vpc-cidr-block --vpc-id vpc-xxx --cidr-block 10.0.2.0/24`. Then create new subnets from the new range.
   ```
3. **Reduce IP consumption: use smaller EC2 instance types that require fewer ENIs, or enable 'assign public IP' only when necessary to avoid extra private IP reservation.** (70% success)
   ```
   Reduce IP consumption: use smaller EC2 instance types that require fewer ENIs, or enable 'assign public IP' only when necessary to avoid extra private IP reservation.
   ```

## Dead Ends

- **Delete the subnet and recreate it with a larger CIDR** — Deleting a subnet with running resources is impossible; you must first terminate all resources. (70% fail)
- **Manually assign Elastic IPs to free up private IPs** — Elastic IPs are public IPs and don't affect private IP address usage in subnets. (95% fail)
- **Increase subnet size via AWS Console (no such option)** — Subnet CIDR size is fixed at creation; it cannot be changed afterward. (100% fail)
