Set up a load balancer in Elastic Load Balancing for CodeDeploy Amazon EC2 deployments (original) (raw)

Before you run any blue/green deployment, or an in-place deployment for which you want to specify an optional load balancer in the deployment group, you must have created at least one Classic Load Balancer, Application Load Balancer, or Network Load Balancer in Elastic Load Balancing. For blue/green deployments, you use that load balancer to register the instances that make up your replacement environment. Instances in your original environment can optionally be registered with this same load balancer. For in-place deployments, the load balancer is used to deregister instances that are being worked on by CodeDeploy, and reregister them when the work is complete.

CodeDeploy supports blue/green and in-place deployment to Amazon EC2 instances behind muliple load balancers. For example, assume you have 200 Amazon EC2 instances, where 100 of them are registered with 2 Classic Load Balancers, and another 100 of them are registered with 4 target groups in 2 Application Load Balancers. In this scenario, CodeDeploy will allow you to do blue/green and in-place deployments to all 200 instances, even though they're spread across 2 Classic Load Balancers, 2 Application Load Balancers, and 4 target groups.

CodeDeploy supports up to 10 Classic Load Balancers and 10 target groups, for a total of 20 items.

To configure one or more Classic Load Balancers, follow the instructions in Tutorial: Create a Classic Load Balancer in_User Guide for Classic Load Balancers_. Note the following:

To configure one or more Application Load Balancers, follow the instructions in one of the following topics:

To configure one or more Network Load Balancers, follow the instructions in one of the following topics: