AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS CodeDeploy DeploymentGroup DeploymentStyle

The DeploymentStyle property type specifies the type of AWS CodeDeploy deployment that you want to run and whether to route deployment traffic behind a load balancer.

DeploymentStyle is a property of the AWS::CodeDeploy::DeploymentGroup resource.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "DeploymentOption" : String, "DeploymentType" : String }

YAML

DeploymentOption: String DeploymentType: String

Properties

DeploymentOption

Indicates whether to route deployment traffic behind a load balancer.

Required: No

Type: String

Valid values: WITH_TRAFFIC_CONTROL or WITHOUT_TRAFFIC_CONTROL

Update requires: No interruption

DeploymentType

Indicates whether to run an in-place or blue/green deployment.

AWS CloudFormation supports blue/green deployments on AWS Lambda compute platforms only. For more information about deploying on a AWS Lambda compute platform, see Deployments on an AWS Lambda Compute Platform in the AWS CodeDeploy User Guide.

Required: No

Type: String

Valid values: IN_PLACE or BLUE_GREEN

Update requires: No interruption

See Also

Example

The following example creates deployment group with a BLUE_GREEN deployment type.

JSON

"CodeDeployDeploymentGroup": { "Type": "AWS::CodeDeploy::DeploymentGroup", "Properties": { "ApplicationName": { "Ref": "CodeDeployApplication" }, "DeploymentConfigName": "CodeDeployDefault.LambdaCanary10Percent5Minutes", "DeploymentStyle": { "DeploymentType": "BLUE_GREEN", "DeploymentOption": "WITH_TRAFFIC_CONTROL" }, "ServiceRoleArn": { "Fn::GetAtt": [ "CodeDeployServiceRole", "Arn" ] } } }

YAML

CodeDeployDeploymentGroup: Type: 'AWS::CodeDeploy::DeploymentGroup' Properties: ApplicationName: !Ref CodeDeployApplication DeploymentConfigName: CodeDeployDefault.LambdaCanary10Percent5Minutes DeploymentStyle: DeploymentType: BLUE_GREEN DeploymentOption: WITH_TRAFFIC_CONTROL ServiceRoleArn: !GetAtt CodeDeployServiceRole.Arn

See Also