How do I migrate from Classic Load Balancer to Application Load Balancer or Network Load Balancer?

3 minute read
0

I want to migrate my Classic Load Balancer to an Application Load Balancer or Network Load Balancer.

Resolution

Compare load balancer features

Before you migrate your Classic Load balancer, compare the features of Application Load Balancers and Network Load Balancers. For more information, see Elastic Load Balancing features.

Application Load Balancer

An Application Load Balancer requires a minimum of two subnets. If your load balancer has only one subnet, then specify a second subnet when you migrate.

By default, an Application Load Balancer has cross-zone load balancing turned on. You can turn off the feature at the load balancer level but not at the target group level.

An Application Load Balancer supports request redirection on the load balancer. If you configured a Classic Load Balancer's backend connections for HTTP redirection, then you can turn off or remove redirection when you migrate.

Network Load Balancer

You can turn off cross-zone load balancing for a Network Load Balancer at the load balancer level.

You must associate security groups to a Network Load Balancer when you create the load balancer. You can't associate security groups to an existing Network Load Balancer. To restrict traffic, use the security groups that are associated with the targets. For the Network Load Balancer level, use the subnet's network access control lists (network ACLs) to restrict traffic.

Migrate your Classic Load Balancer to an Application Load Balancer or Network Load Balancer

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

To create and configure an Application Load Balancer or Network Load Balancer, use the migration wizard. Test the new load balancer to make sure that it works. Then, manually redirect the traffic from your Classic Load Balancer to the new load balancer and update policies, scripts, and code.

After you redirect traffic, you can use the Amazon Elastic Compute Cloud (Amazon EC2) console to delete the old load balancer. Or, run the delete-load-balancer AWS CLI command.

Troubleshoot downtime during a load balancer migration

To minimize downtime during the load balancer migration, run tests against the new load balancer before you move production traffic. Then, verify that the new load balancer can manage traffic requests.

To gradually route traffic to the new load balancer, use the Amazon Route 53 weighted routing policy. If you experience issues with the new load balancer, then assign the traffic weight a value of 0 (zero).

If you don't use Route 53 as the DNS provider, then continue to run the old load balancer. Reduce the Time to Live (TTL) value of the existing record to 0 so that the DNS record isn't cached. Wait for the previous TTL value to reset, and then point the DNS record to the new load balancer DNS name. If you experience issues with the new load balancer, then point the DNS record to the DNS name of the Classic Load Balancer. After you resolve the issue, return the TTL value to the original value.

AWS OFFICIAL
AWS OFFICIALUpdated 4 months ago