A subnet in my virtual private cloud (VPC) has run out of available IP addresses, and I’m using that subnet in conjunction with Elastic Load Balancing load balancers.

If subnets in your VPC run out of available IP addresses, AWS resources such as load balancers might not respond successfully to increased traffic.

It’s a best practice to keep at least eight IP addresses in each subnet available for use. There are two ways to free up or add additional IP addresses for use with load balancers. The following considerations apply to both Application Load Balancers and Classic Load Balancers:

  1. Delete unused elastic network interfaces (ENIs) to free up IP addresses in the subnet. To delete an unused ENI, see Deleting an Elastic Network Interface.
  2. Create or add a new subnet with IP addresses available to your load balancer. You can create and add a new subnet to your VPC, and then attach that subnet to your load balancer. If you ran out of IPs in one of your existing subnets, consider creating a new subnet in your VPC and launching new resources into the new subnet, or adding additional CIDR blocks to your VPC.
    Note: To attach a subnet to an Application Load Balancer, see Availability Zones for Your Application Load Balancer.

If you create a new subnet, review the route tables and access control list (ACL) rules associated with your subnet to be sure that your new subnet routes traffic the same way your previous subnet did. For example, if your previous subnet had a default route configured to an Internet gateway, but your new subnet does not, your new subnet cannot send and receive traffic to and from the Internet as your previous subnet did. Consider also enabling cross-zone load balancing as best practice.

Note: Keep the requirements for subnets on a load balancer in mind— specifically, load balancers can have at most one subnet per Availability Zone.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-11-02

Updated: 2017-10-16