Menu
AWS CodeDeploy
User Guide (API Version 2014-10-06)

Working with Deployment Configurations in AWS CodeDeploy

A deployment configuration is a set of deployment rules and deployment success and failure conditions used by AWS CodeDeploy during a deployment. The deployment configuration specifies, through the use of a minimum healthy hosts 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. If you don't specify a deployment configuration, AWS CodeDeploy uses the CodeDeployDefault.OneAtATime deployment configuration.

For more information about how AWS 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 in AWS

The following table lists the predefined deployment configurations.

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 will be displayed as Succeeded if the application revision is deployed to one or more of the instances. The status of the overall deployment will be displayed as Failed if the application revision is not deployed to any of the instances. Using an example of nine instances, CodeDeployDefault.AllAtOnce will attempt to deploy to all nine instances at once. The overall deployment will succeed if deployment to even a single instance is successful; it will fail only if deployments to all nine instances fail.

Blue/green deployments:

  • Deployment to replacement environment: Follows same deployment rules as CodeDeployDefault.AllAtOnce for in-place deployments.

  • Traffic rerouting: Routes traffic to all instances in the replacement environment at once. Succeeds if traffic is successfully rerouted to at least one instance. Fails after rerouting to all instances fails.

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 will deploy to up to four instances at a time. The overall deployment succeeds if deployment to five or more instances succeed; otherwise, the deployment fails.

Blue/green deployments:

  • Deployment to replacement environment: Follows same deployment rules as CodeDeployDefault.HalfAtATime for in-place deployments.

  • Traffic rerouting: Routes traffic to up to half the instances in the replacement environment at a time. Succeeds if rerouting to at least half of the instances succeeds; fails otherwise.

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:

  • The overall deployment succeeds if the application revision is deployed to all of the instances. The exception to this rule is if deployment to the last instance fails, the overall deployment still succeeds. This is because AWS CodeDeploy allows only one instance at a time to be taken offline with the CodeDeployDefault.OneAtATime configuration.

  • The overall deployment fails as soon as the application revision fails to be deployed to any but the last instance.

  • In an example using nine instances, it will deploy to one instance at a time. The overall deployment succeeds if deployment to the first eight instances is successful; the overall deployment fails if deployment to any of the first eight instances fails.

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 to replacement environment: Follows same deployment rules as CodeDeployDefault.OneAtATime for in-place deployments.

  • Traffic rerouting: Routes traffic to one instance in the replacement environment at a time. Succeeds if traffic is successfully rerouted to all replacement instances. Fails after the very first rerouting failure. The exception to this rule is if the last instance fails to register, the overall deployment still succeeds.

Topics