I want to attach an Elastic IP address to a new or existing public, internet-facing Network Load Balancer.
Resolution
Attach an Elastic IP address to a new Network Load Balancer
Before you begin, check that your AWS account has an Elastic IP address that isn't associated with other resources.
Important: After a Network Load Balancer is created, you can't modify its existing subnets or Network Load Balancer node Elastic IP addresses.
Complete the following steps:
- Open the Amazon Elastic Compute Cloud (Amazon EC2) console.
- Choose the AWS Region where you want to create your Network Load Balancer.
- Allocate an Elastic IP address for your Network Load Balancer.
Note: Create the same number of Elastic IP addresses as the number of subnets that you select in each Availability Zone. For more information, see Elastic IP address quota.
- Under Load Balancing, choose Load Balancers.
- Choose Create Load Balancer.
- For Network Load Balancer, choose Create.
- Select the virtual private cloud (VPC) where you want to provision the Network Load Balancer.
- Under Mappings, select Availability Zones and the corresponding subnet for each.
- For IPv4 settings, IPv4 address is selected by default. Select Use an Elastic IP address from the list to assign to your Network Load Balancer.
- After you specify the Elastic IP address, complete the remaining steps to create a Network Load Balancer.
Note: After a Network Load Balancer is created, you can't change its subnets and Elastic IP addresses. Use subnets for other Availability Zones to deploy additional Network Load Balancer nodes with either AWS assigned or Elastic IP addresses.
Add a new node with an Elastic IP address to an existing Network Load Balancer
Note: To add an Elastic IP address to an existing Network Load Balancer, you must have at least one inactive Availability Zone in the Region.
Complete the following steps:
- Open the Amazon EC2 console.
- Choose the Region where your Network Load Balancer is located.
- Under Load Balancing, choose Load Balancers.
- Select your Network Load Balancer.
- Choose Actions, and then choose Edit Subnets.
- Select a subnet from the remaining Availability Zones.
- For IPv4 address, select Choose an Elastic IP. A list appears that contains each of the Elastic IP addresses in the specified Region.
Note: If the Choose an Elastic IP option is unavailable, then you must allocate an Elastic IP address for the Network Load Balancer elastic network interfaces.
- Choose Save. A new Network Load Balancer node is created in the subnet that you specified.
(Optional) Confirm that you've correctly configured your Elastic IP address attachments
Complete the following steps:
- Open the Amazon EC2 console.
- Under Network & Security, choose Network Interfaces.
- In the filter section, enter the name of your Network Load Balancer.
- Review the list of the Network Load Balancer's elastic network interfaces. Confirm that the IP addresses for the elastic network interfaces match the Elastic IP addresses in the IPv4 Public IP column.