A subnet in my Amazon Virtual Private Cloud (Amazon VPC) ran out of IP addresses. I use the subnet with Elastic Load Balancing (ELB) load balancers.
Short description
A subnet has insufficient IP addresses if fewer than eight IP addresses are available in it. This configuration applies to Application Load Balancers, Network Load Balancers, and Classic Load Balancers.
Note: Load balancers can have only one subnet in each Availability Zone. For more information, see Requirements.
Resolution
To resolve insufficient IP address issues, take the following actions.
Delete unused network interfaces
Delete elastic network interfaces that you no longer use.
Add a new subnet with available IP addresses
Complete the following steps to associate a new subnet with your load balancer and increase the number of available IP addresses:
- Create a new subnet.
Note: You can base the subnet on the original CIDR block or add a new CIDR block.
- Configure the subnet's route tables and network access control list (ACL) rules to route traffic the same way as the existing subnet.
For example, if you configured a default route to an internet gateway in your existing subnet, then confirm that your new subnet has a similar route.
- To associate the new subnet with your load balancer, update the load balancer's subnet and Availability Zone configuration.
For Application Load Balancers, see Update the Availability Zones for your Application Load Balancer.
For Network Load Balancers, see Update the Availability Zones for your Network Load Balancer.
Important: For Network Load Balancers, you must remove the existing subnet first, and then add the new one. This process deletes the subnet's network interface and terminates all active connections in that Availability Zone.
- (Optional) To increase availability and improve traffic distribution, activate cross-zone load balancing.
Related information
Create an internet-facing Classic Load Balancer
Create an Application Load Balancer
Create a Network Load Balancer