Create a deployment configuration with CodeDeploy - Amazon CodeDeploy
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Create a deployment configuration with CodeDeploy

You can use the CodeDeploy console, Amazon CLI, the CodeDeploy APIs, or an Amazon CloudFormation template to create custom deployment configurations.

For information about using an Amazon CloudFormation template to create a deployment configuration, see Amazon CloudFormation templates for CodeDeploy reference.

To use the Amazon CLI to create a deployment configuration, call the create-deployment-config command, specifying:

  • A name that uniquely identifies the deployment configuration. This name must be unique across all of the deployment configurations you create with CodeDeploy associated with your Amazon account.

  • The minimum number or percentage of healthy instances that should be available at any time during the deployment. For more information, see Instance Health.

The following example creates an EC2/On-Premises deployment configuration named ThreeQuartersHealthy that requires 75% of target instances to remain healthy during a deployment:

aws deploy create-deployment-config --deployment-config-name ThreeQuartersHealthy --minimum-healthy-hosts type=FLEET_PERCENT,value=75

The following example creates an Amazon Lambda deployment configuration named Canary25Percent45Minutes. It uses canary traffic shifting to shift 25 percent of traffic in the first increment. The remaining 75 percent shifted 45 minutes later:

aws deploy create-deployment-config --deployment-config-name Canary25Percent45Minutes --traffic-routing-config "type="TimeBasedCanary",timeBasedCanary={canaryPercentage=25,canaryInterval=45}" --compute-platform Lambda

The following example creates an Amazon ECS deployment configuration named Canary25Percent45Minutes. It uses canary traffic shifting to shift 25 percent of traffic in the first increment. The remaining 75 percent shifted 45 minutes later:

aws deploy create-deployment-config --deployment-config-name Canary25Percent45Minutes --traffic-routing-config "type="TimeBasedCanary",timeBasedCanary={canaryPercentage=25,canaryInterval=45}" --compute-platform ECS