How do I set up my load balancer to work with IPv6 addresses?

Last updated: 2020-05-22

I want to configure my load balancer so that my clients can connect to it using IPv6 addresses. How can I do this?

Short Description

IPv6 addresses can only be associated with internet-facing Application Load Balancers. Internal Application Load Balancers, Classic Load Balancers, and Network Load Balancers do not support IPv6 addresses.

To use IPv6 addresses, the virtual private cloud (VPC) where you launch your Application Load Balancer must have subnets with associated IPv6 CIDR blocks. For more information, see IPv6 addresses. To associate IPv6 addresses with your VPC and subnets, see Associating an IPv6 CIDR block with your VPC and Associating an IPv6 CIDR block with your subnet.

Resolution

Update the IP address type using the AWS Management Console

1.    Open the Amazon Elastic Compute Cloud (Amazon EC2) console.

2.    On the navigation pane, under LOAD BALANCING, choose Load Balancers.

3.    Select the load balancer.

4.    Choose Actions, and then choose Edit IP address type.

5.    For IP address type, choose either:
       ipv4 to support only IPv4 addresses
       -or-
       dualstack to support both IPv4 and IPv6 addresses

6.    Choose Save.

Update the IP address type using the AWS Command Line Interface (AWS CLI)

Run the following command:

set-ip-address-type --load-balancer-arn <value> --ip-address-type <value>

Note: Be sure to replace the placeholders in the above command with your corresponding values.

Update the DNS record pointing to your Application Load Balancer

Run the following command to update the CNAME or Alias (A) record of your domain to point to the Application Load Balancer’s DNS name (with a "dualstack." prefix):

dualstack.name-123456789.region.elb.amazonaws.com

Note: Be sure to replace the placeholders in the above command with your corresponding values.

Clients that communicate with the load balancer using IPv4 addresses resolve the A record. Clients that communicate with the load balancer using IPv6 addresses resolve the AAAA record.