Update the Availability Zones for your Network Load Balancer
You enable one or more Availability Zones for your Network Load Balancer when you create it. If you enable multiple Availability Zones for your Network Load Balancer, this increases the fault tolerance of your applications. You can't disable Availability Zones for a Network Load Balancer after you create it, but you can enable additional Availability Zones.
When you enable an Availability Zone, you specify one subnet from that Availability Zone. Elastic Load Balancing creates a Network Load Balancer node in the Availability Zone and a network interface for the subnet (the description starts with "ELB net" and includes the name of the Network Load Balancer). Each Network Load Balancer node in the Availability Zone uses this network interface to get an IPv4 address. Note that you can view this network interface but you can't modify it.
When you create an internet-facing Network Load Balancer, you can optionally specify one Elastic IP address per subnet. If you do not choose one of your own Elastic IP addresses, Elastic Load Balancing provides one Elastic IP address per subnet for you. These Elastic IP addresses provide your Network Load Balancer with static IP addresses that will not change during the life of the Network Load Balancer. You can't change these Elastic IP addresses after you create the Network Load Balancer.
When you create an internal Network Load Balancer, you can optionally specify one private IP address per subnet. If you do not specify an IP address from the subnet, Elastic Load Balancing chooses one for you. These private IP addresses provide your Network Load Balancer with static IP addresses that will not change during the life of the Network Load Balancer. You can't change these private IP addresses after you create the Network Load Balancer.
Considerations
-
For internet-facing Network Load Balancers, the subnets that you specify must have at least 8 available IP addresses. For internal Network Load Balancers, this is only required if you let AWS select a private IPv4 address from the subnet.
-
You can't specify a subnet in a constrained Availability Zone. The error message is "Load balancers with type 'network' are not supported in az_name". You can specify a subnet in another Availability Zone that is not constrained and use cross-zone load balancing to distribute traffic to targets in the constrained Availability Zone.
-
You can specify subnets that were shared with you.
-
You can't specify a subnet in a Local Zone.
After you enable an Availability Zone, the Network Load Balancer starts routing requests to the registered targets in that Availability Zone. Your Network Load Balancer is most effective if you ensure that each enabled Availability Zone has at least one registered target.
To add Availability Zones using the console
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Load Balancers.
-
Select the name of the Network Load Balancer to open its details page.
-
On the Network mapping tab, choose Edit subnets.
-
To enable an Availability Zone, select the check box for that Availability Zone. If there is one subnet for that Availability Zone, it is selected. If there is more than one subnet for that Availability Zone, select one of the subnets. Note that you can select only one subnet per Availability Zone.
For an internet-facing Network Load Balancer, you can select an Elastic IP address for each Availability Zone. For an internal Network Load Balancer, you can assign a private IP address from the IPv4 range of each subnet instead of letting Elastic Load Balancing assign one.
-
Choose Save changes.
To add Availability Zones using the AWS CLI
Use the set-subnets command.