Working with deployment configurations in CodeDeploy
A deployment configuration is a set of rules and success and failure conditions used by CodeDeploy during a deployment. These rules and conditions are different, depending on whether you deploy to an EC2/On-Premises compute platform, AWS Lambda compute platform, or Amazon ECS compute platform.
Deployment configurations on an EC2/on-premises compute platform
When you deploy to an EC2/On-Premises compute platform, the deployment configuration specifies, through the use of a 'minimum healthy hosts' value and an optional 'minimum healthy hosts per zone' value, the number or percentage of instances that must remain available at any time during a deployment.
You can use one of the three predefined deployment configurations provided by AWS or create a custom deployment configuration. For more information about creating custom deployment configurations, see Create a Deployment Configuration. If you don't specify a deployment configuration, CodeDeploy uses the CodeDeployDefault.OneAtATime deployment configuration.
For more information about how CodeDeploy monitors and evaluates instance health during a deployment, see Instance Health. To view a list of deployment configurations already registered to your AWS account, see View Deployment Configuration Details.
Predefined deployment configurations for an EC2/on-premises compute platform
The following table lists the predefined deployment configurations.
Note
There are no predefined deployment configurations that support the zonal configuration feature (which is the feature that lets you specify the number of healthy hosts per Availability Zone). If you want to use this feature, you must create your own deployment configuration.
Deployment configuration | Description |
---|---|
CodeDeployDefault.AllAtOnce | In-place deployments: Attempts to deploy an application revision to as many instances as possible at once. The status of the overall deployment is displayed as Succeeded if the application revision is deployed to one or more of the instances. The status of the overall deployment is displayed as Failed if the application revision is not deployed to any of the instances. Using an example of nine instances, CodeDeployDefault.AllAtOnce attempts to deploy to all nine instances at once. The overall deployment succeeds if deployment to even a single instance is successful. It fails only if deployments to all nine instances fail.Blue/green deployments:
|
CodeDeployDefault.HalfAtATime |
In-place deployments: Deploys to up to half of the instances at a time (with fractions rounded down). The overall deployment succeeds if the application revision is deployed to at least half of the instances (with fractions rounded up). Otherwise, the deployment fails. In the example of nine instances, it deploys to up to four instances at a time. The overall deployment succeeds if deployment to five or more instances succeed. Otherwise, the deployment fails. NoteIf you're deploying to instances in multiple Auto Scaling groups, CodeDeploy will deploy
to up to half of the instances at a time regardless of the Auto Scaling group
they're in. For example, let's assume you have two Auto Scaling groups,
Blue/green deployments:
|
CodeDeployDefault.OneAtATime |
In-place deployments: Deploys the application revision to only one instance at a time. For deployment groups that contain more than one instance:
For deployment groups that contain only one instance, the overall deployment is successful only if deployment to the single instance is successful. Blue/green deployments:
|
Deployment configurations on an Amazon ECS compute platform
When you deploy to an Amazon ECS compute platform, the deployment configuration specifies how traffic is shifted to the updated Amazon ECS task set. You can shift traffic using a canary, linear, or all-at-once deployment configuration. For more information, see Deployment configuration.
You can also create your own custom canary or linear deployment configuration. For more information, see Create a Deployment Configuration.
Predefined deployment configurations for an Amazon ECS compute platform
The following table lists the predefined configurations available for Amazon ECS deployments.
Note
If you're using a Network Load Balancer, only the CodeDeployDefault.ECSAllAtOnce
predefined
deployment configuration is supported.
Deployment configuration | Description |
---|---|
CodeDeployDefault.ECSLinear10PercentEvery1Minutes |
Shifts 10 percent of traffic every minute until all traffic is shifted. |
CodeDeployDefault.ECSLinear10PercentEvery3Minutes |
Shifts 10 percent of traffic every three minutes until all traffic is shifted. |
CodeDeployDefault.ECSCanary10Percent5Minutes |
Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed five minutes later. |
CodeDeployDefault.ECSCanary10Percent15Minutes |
Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 15 minutes later. |
CodeDeployDefault.ECSAllAtOnce |
Shifts all traffic to the updated Amazon ECS container at once. |
Deployment configurations for AWS CloudFormation blue/green deployments (Amazon ECS)
When you deploy to an Amazon ECS compute platform through AWS CloudFormation blue/green deployments, the deployment configuration specifies how traffic is shifted to the updated Amazon ECS container. You can shift traffic using a canary, linear, or all-at-once deployment configuration. For more information, see Deployment configuration.
With AWS CloudFormation blue/green deployments, you cannot create your own custom canary or linear deployment configuration. For step-by-step instructions on using AWS CloudFormation to manage your Amazon ECS blue/green deployments, see Automate ECS blue/green deployments through CodeDeploy using AWS CloudFormation in the AWS CloudFormation User Guide.
Note
Managing Amazon ECS blue/green deployments with AWS CloudFormation is not available in the Europe (Milan), Africa (Cape Town), and Asia Pacific (Osaka) regions.
Deployment configurations on an AWS Lambda compute platform
When you deploy to an AWS Lambda compute platform, the deployment configuration specifies the way traffic is shifted to the new Lambda function versions in your application. You can shift traffic using a canary, linear, or all-at-once deployment configuration. For more information, see Deployment configuration.
You can also create your own custom canary or linear deployment configuration. For more information, see Create a Deployment Configuration.
Predefined deployment configurations for an AWS Lambda compute platform
The following table lists the predefined configurations available for AWS Lambda deployments.
Deployment configuration | Description |
---|---|
CodeDeployDefault.LambdaCanary10Percent5Minutes |
Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed five minutes later. |
CodeDeployDefault.LambdaCanary10Percent10Minutes |
Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 10 minutes later. |
CodeDeployDefault.LambdaCanary10Percent15Minutes |
Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 15 minutes later. |
CodeDeployDefault.LambdaCanary10Percent30Minutes |
Shifts 10 percent of traffic in the first increment. The remaining 90 percent is deployed 30 minutes later. |
CodeDeployDefault.LambdaLinear10PercentEvery1Minute |
Shifts 10 percent of traffic every minute until all traffic is shifted. |
CodeDeployDefault.LambdaLinear10PercentEvery2Minutes |
Shifts 10 percent of traffic every two minutes until all traffic is shifted. |
CodeDeployDefault.LambdaLinear10PercentEvery3Minutes |
Shifts 10 percent of traffic every three minutes until all traffic is shifted. |
CodeDeployDefault.LambdaLinear10PercentEvery10Minutes | Shifts 10 percent of traffic every 10 minutes until all traffic is shifted. |
CodeDeployDefault.LambdaAllAtOnce |
Shifts all traffic to the updated Lambda functions at once. |
Topics