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

Last updated: 2021-03-03

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 be associated only with internet-facing Application Load Balancers and Network 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.


Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.

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  
      dualstack to support both IPv4 and IPv6 addresses

6.    Choose Save.

Update the IP address type to "dualstack" using the AWS CLI

Run the following command:

aws elbv2 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. The possible values for --ip-address-type include ipv4 and dualstack.

Update the DNS record pointing to your Application Load Balancer

Update the CNAME or Alias (A) record of your domain to point to the Application Load Balancer’s DNS name (with a "dualstack." prefix). The following example is a load balancer DNS name with the "dualstack" prefix:

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.