

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS CodeDeploy
<a name="AWS_CodeDeploy"></a>

**Resource types**
+ [AWS::CodeDeploy::Application](aws-resource-codedeploy-application.md)
+ [AWS::CodeDeploy::DeploymentConfig](aws-resource-codedeploy-deploymentconfig.md)
+ [AWS::CodeDeploy::DeploymentGroup](aws-resource-codedeploy-deploymentgroup.md)

# AWS::CodeDeploy::Application
<a name="aws-resource-codedeploy-application"></a>

The `AWS::CodeDeploy::Application` resource creates an AWS CodeDeploy application. In CodeDeploy, an application is a name that functions as a container to ensure that the correct combination of revision, deployment configuration, and deployment group are referenced during a deployment. You can use the `AWS::CodeDeploy::DeploymentGroup` resource to associate the application with a CodeDeploy deployment group. For more information, see [CodeDeploy Deployments](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-steps.html) in the *AWS CodeDeploy User Guide*.

## Syntax
<a name="aws-resource-codedeploy-application-syntax"></a>

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

### JSON
<a name="aws-resource-codedeploy-application-syntax.json"></a>

```
{
  "Type" : "AWS::CodeDeploy::Application",
  "Properties" : {
      "[ApplicationName](#cfn-codedeploy-application-applicationname)" : String,
      "[ComputePlatform](#cfn-codedeploy-application-computeplatform)" : String,
      "[Tags](#cfn-codedeploy-application-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-codedeploy-application-syntax.yaml"></a>

```
Type: AWS::CodeDeploy::Application
Properties:
  [ApplicationName](#cfn-codedeploy-application-applicationname): String
  [ComputePlatform](#cfn-codedeploy-application-computeplatform): String
  [Tags](#cfn-codedeploy-application-tags): 
    - Tag
```

## Properties
<a name="aws-resource-codedeploy-application-properties"></a>

`ApplicationName`  <a name="cfn-codedeploy-application-applicationname"></a>
 A name for the application. If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the application name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).   
 Updates to `ApplicationName` are not supported. 
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ComputePlatform`  <a name="cfn-codedeploy-application-computeplatform"></a>
The compute platform that CodeDeploy deploys the application to.  
*Required*: No  
*Type*: String  
*Allowed values*: `Server | Lambda | ECS | Kubernetes`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-codedeploy-application-tags"></a>
 The metadata that you apply to CodeDeploy applications to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.   
*Required*: No  
*Type*: Array of [Tag](aws-properties-codedeploy-application-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-codedeploy-application-return-values"></a>

### Ref
<a name="aws-resource-codedeploy-application-return-values-ref"></a>

When you pass the logical ID of an `AWS::CodeDeploy::Application` resource to the intrinsic `Ref` function, the function returns the application name, such as `myapplication-a123d0d1`.

For more information about using the `Ref` function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-codedeploy-application--examples"></a>



**Topics**
+ [Specify an application with a Lambda compute platform](#aws-resource-codedeploy-application--examples--Specify_an_application_with_a_compute_platform)
+ [Specify an application with a Server compute platform](#aws-resource-codedeploy-application--examples--Specify_an_application_with_a_Server_compute_platform)

### Specify an application with a Lambda compute platform
<a name="aws-resource-codedeploy-application--examples--Specify_an_application_with_a_compute_platform"></a>

The following example specifies a CodeDeploy application with a Lambda compute platform.

#### JSON
<a name="aws-resource-codedeploy-application--examples--Specify_an_application_with_a_compute_platform--json"></a>

```
"CodeDeployApplication": { 
    "Type": "AWS::CodeDeploy::Application",
    "Properties": { 
        "ComputePlatform": "Lambda" 
    } 
}
```

#### YAML
<a name="aws-resource-codedeploy-application--examples--Specify_an_application_with_a_compute_platform--yaml"></a>

```
CodeDeployApplication: 
  Type: AWS::CodeDeploy::Application 
  Properties:
    ComputePlatform: Lambda
```

### Specify an application with a Server compute platform
<a name="aws-resource-codedeploy-application--examples--Specify_an_application_with_a_Server_compute_platform"></a>

The following example creates a CodeDeploy application with a `Server` compute platform.

#### JSON
<a name="aws-resource-codedeploy-application--examples--Specify_an_application_with_a_Server_compute_platform--json"></a>

```
"CodeDeployApplication": { 
    "Type": "AWS::CodeDeploy::Application",
    "Properties": { 
        "ComputePlatform": "Server"
    }
}
```

#### YAML
<a name="aws-resource-codedeploy-application--examples--Specify_an_application_with_a_Server_compute_platform--yaml"></a>

```
CodeDeployApplication: 
  Type: AWS::CodeDeploy::Application 
  Properties:
    ComputePlatform: Server
```

## See also
<a name="aws-resource-codedeploy-application--seealso"></a>
+ For configuring your deployment and specifying your application revisions, see [ AWS::CodeDeploy::DeploymentConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentconfig.html) and [ AWS::CodeDeploy::DeploymentGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html).



# AWS::CodeDeploy::Application Tag
<a name="aws-properties-codedeploy-application-tag"></a>

Information about a tag.

## Syntax
<a name="aws-properties-codedeploy-application-tag-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-application-tag-syntax.json"></a>

```
{
  "[Key](#cfn-codedeploy-application-tag-key)" : String,
  "[Value](#cfn-codedeploy-application-tag-value)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-application-tag-syntax.yaml"></a>

```
  [Key](#cfn-codedeploy-application-tag-key): String
  [Value](#cfn-codedeploy-application-tag-value): String
```

## Properties
<a name="aws-properties-codedeploy-application-tag-properties"></a>

`Key`  <a name="cfn-codedeploy-application-tag-key"></a>
The tag's key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-codedeploy-application-tag-value"></a>
The tag's value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentConfig
<a name="aws-resource-codedeploy-deploymentconfig"></a>

 The `AWS::CodeDeploy::DeploymentConfig` resource creates a set of deployment rules, deployment success conditions, and deployment failure conditions that AWS CodeDeploy uses during a deployment. The deployment configuration specifies the number or percentage of instances that must remain available at any time during a deployment. 

## Syntax
<a name="aws-resource-codedeploy-deploymentconfig-syntax"></a>

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

### JSON
<a name="aws-resource-codedeploy-deploymentconfig-syntax.json"></a>

```
{
  "Type" : "AWS::CodeDeploy::DeploymentConfig",
  "Properties" : {
      "[ComputePlatform](#cfn-codedeploy-deploymentconfig-computeplatform)" : String,
      "[DeploymentConfigName](#cfn-codedeploy-deploymentconfig-deploymentconfigname)" : String,
      "[MinimumHealthyHosts](#cfn-codedeploy-deploymentconfig-minimumhealthyhosts)" : MinimumHealthyHosts,
      "[TrafficRoutingConfig](#cfn-codedeploy-deploymentconfig-trafficroutingconfig)" : TrafficRoutingConfig,
      "[ZonalConfig](#cfn-codedeploy-deploymentconfig-zonalconfig)" : ZonalConfig
    }
}
```

### YAML
<a name="aws-resource-codedeploy-deploymentconfig-syntax.yaml"></a>

```
Type: AWS::CodeDeploy::DeploymentConfig
Properties:
  [ComputePlatform](#cfn-codedeploy-deploymentconfig-computeplatform): String
  [DeploymentConfigName](#cfn-codedeploy-deploymentconfig-deploymentconfigname): String
  [MinimumHealthyHosts](#cfn-codedeploy-deploymentconfig-minimumhealthyhosts): 
    MinimumHealthyHosts
  [TrafficRoutingConfig](#cfn-codedeploy-deploymentconfig-trafficroutingconfig): 
    TrafficRoutingConfig
  [ZonalConfig](#cfn-codedeploy-deploymentconfig-zonalconfig): 
    ZonalConfig
```

## Properties
<a name="aws-resource-codedeploy-deploymentconfig-properties"></a>

`ComputePlatform`  <a name="cfn-codedeploy-deploymentconfig-computeplatform"></a>
The destination platform type for the deployment (`Lambda`, `Server`, or `ECS`).  
*Required*: No  
*Type*: String  
*Allowed values*: `Server | Lambda | ECS | Kubernetes`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DeploymentConfigName`  <a name="cfn-codedeploy-deploymentconfig-deploymentconfigname"></a>
 A name for the deployment configuration. If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the deployment configuration name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).   
 If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. 
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MinimumHealthyHosts`  <a name="cfn-codedeploy-deploymentconfig-minimumhealthyhosts"></a>
The minimum number of healthy instances that should be available at any time during the deployment. There are two parameters expected in the input: type and value.  
The type parameter takes either of the following values:  
+ HOST\$1COUNT: The value parameter represents the minimum number of healthy instances as an absolute value.
+ FLEET\$1PERCENT: The value parameter represents the minimum number of healthy instances as a percentage of the total number of instances in the deployment. If you specify FLEET\$1PERCENT, at the start of the deployment, AWS CodeDeploy converts the percentage to the equivalent number of instance and rounds up fractional instances.
The value parameter takes an integer.  
For example, to set a minimum of 95% healthy instance, specify a type of FLEET\$1PERCENT and a value of 95.  
 For more information about instance health, see [CodeDeploy Instance Health](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-health.html) in the AWS CodeDeploy User Guide.   
*Required*: No  
*Type*: [MinimumHealthyHosts](aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TrafficRoutingConfig`  <a name="cfn-codedeploy-deploymentconfig-trafficroutingconfig"></a>
The configuration that specifies how the deployment traffic is routed.  
*Required*: No  
*Type*: [TrafficRoutingConfig](aws-properties-codedeploy-deploymentconfig-trafficroutingconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ZonalConfig`  <a name="cfn-codedeploy-deploymentconfig-zonalconfig"></a>
Configure the `ZonalConfig` object if you want AWS CodeDeploy to deploy your application to one [Availability Zone](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones) at a time, within an AWS Region.  
For more information about the zonal configuration feature, see [zonal configuration](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config) in the *CodeDeploy User Guide*.  
*Required*: No  
*Type*: [ZonalConfig](aws-properties-codedeploy-deploymentconfig-zonalconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-codedeploy-deploymentconfig-return-values"></a>

### Ref
<a name="aws-resource-codedeploy-deploymentconfig-return-values-ref"></a>

When you pass the logical ID of an `AWS::CodeDeploy::DeploymentConfig` resource to the intrinsic `Ref` function, the function returns the deployment configuration name, such as `mydeploymentconfig-a123d0d1`.

For more information about using the `Ref` function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-codedeploy-deploymentconfig--examples"></a>



### Specifying minimum healthy hosts
<a name="aws-resource-codedeploy-deploymentconfig--examples--Specifying_minimum_healthy_hosts"></a>

The following example requires at least 75% of the fleet to be healthy. For example, if you had a fleet of four instances, the deployment proceeds one instance at a time.

#### JSON
<a name="aws-resource-codedeploy-deploymentconfig--examples--Specifying_minimum_healthy_hosts--json"></a>

```
"TwentyFivePercentAtATime" : {
    "Type" : "AWS::CodeDeploy::DeploymentConfig",
    "Properties" : {
        "MinimumHealthyHosts" : {
            "Type" : "FLEET_PERCENT",
            "Value" : "75"
        }
    }
}
```

#### YAML
<a name="aws-resource-codedeploy-deploymentconfig--examples--Specifying_minimum_healthy_hosts--yaml"></a>

```
TwentyFivePercentAtATime: 
  Type: AWS::CodeDeploy::DeploymentConfig
  Properties: 
    MinimumHealthyHosts: 
      Type: "FLEET_PERCENT"
      Value: 75
```

# AWS::CodeDeploy::DeploymentConfig MinimumHealthyHosts
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts"></a>

`MinimumHealthyHosts` is a property of the [DeploymentConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentconfig.html) resource that defines how many instances must remain healthy during an AWS CodeDeploy deployment.

## Syntax
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts-syntax.json"></a>

```
{
  "[Type](#cfn-codedeploy-deploymentconfig-minimumhealthyhosts-type)" : String,
  "[Value](#cfn-codedeploy-deploymentconfig-minimumhealthyhosts-value)" : Integer
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts-syntax.yaml"></a>

```
  [Type](#cfn-codedeploy-deploymentconfig-minimumhealthyhosts-type): String
  [Value](#cfn-codedeploy-deploymentconfig-minimumhealthyhosts-value): Integer
```

## Properties
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts-properties"></a>

`Type`  <a name="cfn-codedeploy-deploymentconfig-minimumhealthyhosts-type"></a>
The minimum healthy instance type:  
+ HOST\$1COUNT: The minimum number of healthy instance as an absolute value.
+ FLEET\$1PERCENT: The minimum number of healthy instance as a percentage of the total number of instance in the deployment.
In an example of nine instance, if a HOST\$1COUNT of six is specified, deploy to up to three instances at a time. The deployment is successful if six or more instances are deployed to successfully. Otherwise, the deployment fails. If a FLEET\$1PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment is successful if four or more instance are deployed to successfully. Otherwise, the deployment fails.  
In a call to `GetDeploymentConfig`, CodeDeployDefault.OneAtATime returns a minimum healthy instance type of MOST\$1CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST\$1CONCURRENCY, only to HOST\$1COUNT or FLEET\$1PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment is still successful.
For more information, see [AWS CodeDeploy Instance Health](https://docs.aws.amazon.com//codedeploy/latest/userguide/instances-health.html) in the *AWS CodeDeploy User Guide*.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `HOST_COUNT | FLEET_PERCENT`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-codedeploy-deploymentconfig-minimumhealthyhosts-value"></a>
The minimum healthy instance value.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::CodeDeploy::DeploymentConfig MinimumHealthyHostsPerZone
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone"></a>

Information about the minimum number of healthy instances per Availability Zone.

## Syntax
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone-syntax.json"></a>

```
{
  "[Type](#cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-type)" : String,
  "[Value](#cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-value)" : Integer
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone-syntax.yaml"></a>

```
  [Type](#cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-type): String
  [Value](#cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-value): Integer
```

## Properties
<a name="aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone-properties"></a>

`Type`  <a name="cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-type"></a>
The `type` associated with the `MinimumHealthyHostsPerZone` option.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `HOST_COUNT | FLEET_PERCENT`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-codedeploy-deploymentconfig-minimumhealthyhostsperzone-value"></a>
The `value` associated with the `MinimumHealthyHostsPerZone` option.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::CodeDeploy::DeploymentConfig TimeBasedCanary
<a name="aws-properties-codedeploy-deploymentconfig-timebasedcanary"></a>

A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.

## Syntax
<a name="aws-properties-codedeploy-deploymentconfig-timebasedcanary-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentconfig-timebasedcanary-syntax.json"></a>

```
{
  "[CanaryInterval](#cfn-codedeploy-deploymentconfig-timebasedcanary-canaryinterval)" : Integer,
  "[CanaryPercentage](#cfn-codedeploy-deploymentconfig-timebasedcanary-canarypercentage)" : Integer
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentconfig-timebasedcanary-syntax.yaml"></a>

```
  [CanaryInterval](#cfn-codedeploy-deploymentconfig-timebasedcanary-canaryinterval): Integer
  [CanaryPercentage](#cfn-codedeploy-deploymentconfig-timebasedcanary-canarypercentage): Integer
```

## Properties
<a name="aws-properties-codedeploy-deploymentconfig-timebasedcanary-properties"></a>

`CanaryInterval`  <a name="cfn-codedeploy-deploymentconfig-timebasedcanary-canaryinterval"></a>
The number of minutes between the first and second traffic shifts of a `TimeBasedCanary` deployment.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CanaryPercentage`  <a name="cfn-codedeploy-deploymentconfig-timebasedcanary-canarypercentage"></a>
The percentage of traffic to shift in the first increment of a `TimeBasedCanary` deployment.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::CodeDeploy::DeploymentConfig TimeBasedLinear
<a name="aws-properties-codedeploy-deploymentconfig-timebasedlinear"></a>

A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.

## Syntax
<a name="aws-properties-codedeploy-deploymentconfig-timebasedlinear-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentconfig-timebasedlinear-syntax.json"></a>

```
{
  "[LinearInterval](#cfn-codedeploy-deploymentconfig-timebasedlinear-linearinterval)" : Integer,
  "[LinearPercentage](#cfn-codedeploy-deploymentconfig-timebasedlinear-linearpercentage)" : Integer
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentconfig-timebasedlinear-syntax.yaml"></a>

```
  [LinearInterval](#cfn-codedeploy-deploymentconfig-timebasedlinear-linearinterval): Integer
  [LinearPercentage](#cfn-codedeploy-deploymentconfig-timebasedlinear-linearpercentage): Integer
```

## Properties
<a name="aws-properties-codedeploy-deploymentconfig-timebasedlinear-properties"></a>

`LinearInterval`  <a name="cfn-codedeploy-deploymentconfig-timebasedlinear-linearinterval"></a>
The number of minutes between each incremental traffic shift of a `TimeBasedLinear` deployment.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LinearPercentage`  <a name="cfn-codedeploy-deploymentconfig-timebasedlinear-linearpercentage"></a>
The percentage of traffic that is shifted at the start of each increment of a `TimeBasedLinear` deployment.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::CodeDeploy::DeploymentConfig TrafficRoutingConfig
<a name="aws-properties-codedeploy-deploymentconfig-trafficroutingconfig"></a>

The configuration that specifies how traffic is shifted from one version of a Lambda function to another version during an AWS Lambda deployment, or from one Amazon ECS task set to another during an Amazon ECS deployment.

## Syntax
<a name="aws-properties-codedeploy-deploymentconfig-trafficroutingconfig-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentconfig-trafficroutingconfig-syntax.json"></a>

```
{
  "[TimeBasedCanary](#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedcanary)" : TimeBasedCanary,
  "[TimeBasedLinear](#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedlinear)" : TimeBasedLinear,
  "[Type](#cfn-codedeploy-deploymentconfig-trafficroutingconfig-type)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentconfig-trafficroutingconfig-syntax.yaml"></a>

```
  [TimeBasedCanary](#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedcanary): 
    TimeBasedCanary
  [TimeBasedLinear](#cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedlinear): 
    TimeBasedLinear
  [Type](#cfn-codedeploy-deploymentconfig-trafficroutingconfig-type): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentconfig-trafficroutingconfig-properties"></a>

`TimeBasedCanary`  <a name="cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedcanary"></a>
A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in two increments. The original and target Lambda function versions or ECS task sets are specified in the deployment's AppSpec file.  
*Required*: No  
*Type*: [TimeBasedCanary](aws-properties-codedeploy-deploymentconfig-timebasedcanary.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TimeBasedLinear`  <a name="cfn-codedeploy-deploymentconfig-trafficroutingconfig-timebasedlinear"></a>
A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions or Amazon ECS task sets are specified in the deployment's AppSpec file.  
*Required*: No  
*Type*: [TimeBasedLinear](aws-properties-codedeploy-deploymentconfig-timebasedlinear.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-codedeploy-deploymentconfig-trafficroutingconfig-type"></a>
The type of traffic shifting (`TimeBasedCanary` or `TimeBasedLinear`) used by a deployment configuration.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `TimeBasedCanary | TimeBasedLinear | TimeBasedFlexible | AllAtOnce`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::CodeDeploy::DeploymentConfig ZonalConfig
<a name="aws-properties-codedeploy-deploymentconfig-zonalconfig"></a>

Configure the `ZonalConfig` object if you want AWS CodeDeploy to deploy your application to one [Availability Zone](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones) at a time, within an AWS Region. By deploying to one Availability Zone at a time, you can expose your deployment to a progressively larger audience as confidence in the deployment's performance and viability grows. If you don't configure the `ZonalConfig` object, CodeDeploy deploys your application to a random selection of hosts across a Region.

For more information about the zonal configuration feature, see [zonal configuration](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config) in the *CodeDeploy User Guide*.

## Syntax
<a name="aws-properties-codedeploy-deploymentconfig-zonalconfig-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentconfig-zonalconfig-syntax.json"></a>

```
{
  "[FirstZoneMonitorDurationInSeconds](#cfn-codedeploy-deploymentconfig-zonalconfig-firstzonemonitordurationinseconds)" : Integer,
  "[MinimumHealthyHostsPerZone](#cfn-codedeploy-deploymentconfig-zonalconfig-minimumhealthyhostsperzone)" : MinimumHealthyHostsPerZone,
  "[MonitorDurationInSeconds](#cfn-codedeploy-deploymentconfig-zonalconfig-monitordurationinseconds)" : Integer
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentconfig-zonalconfig-syntax.yaml"></a>

```
  [FirstZoneMonitorDurationInSeconds](#cfn-codedeploy-deploymentconfig-zonalconfig-firstzonemonitordurationinseconds): Integer
  [MinimumHealthyHostsPerZone](#cfn-codedeploy-deploymentconfig-zonalconfig-minimumhealthyhostsperzone): 
    MinimumHealthyHostsPerZone
  [MonitorDurationInSeconds](#cfn-codedeploy-deploymentconfig-zonalconfig-monitordurationinseconds): Integer
```

## Properties
<a name="aws-properties-codedeploy-deploymentconfig-zonalconfig-properties"></a>

`FirstZoneMonitorDurationInSeconds`  <a name="cfn-codedeploy-deploymentconfig-zonalconfig-firstzonemonitordurationinseconds"></a>
The period of time, in seconds, that CodeDeploy must wait after completing a deployment to the *first* Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the second Availability Zone. You might set this option if you want to allow extra bake time for the first Availability Zone. If you don't specify a value for `firstZoneMonitorDurationInSeconds`, then CodeDeploy uses the `monitorDurationInSeconds` value for the first Availability Zone.  
For more information about the zonal configuration feature, see [zonal configuration](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config) in the *CodeDeploy User Guide*.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MinimumHealthyHostsPerZone`  <a name="cfn-codedeploy-deploymentconfig-zonalconfig-minimumhealthyhostsperzone"></a>
The number or percentage of instances that must remain available per Availability Zone during a deployment. This option works in conjunction with the `MinimumHealthyHosts` option. For more information, see [About the minimum number of healthy hosts per Availability Zone](https://docs.aws.amazon.com//codedeploy/latest/userguide/instances-health.html#minimum-healthy-hosts-az) in the *CodeDeploy User Guide*.  
If you don't specify the `minimumHealthyHostsPerZone` option, then CodeDeploy uses a default value of `0` percent.  
For more information about the zonal configuration feature, see [zonal configuration](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config) in the *CodeDeploy User Guide*.  
*Required*: No  
*Type*: [MinimumHealthyHostsPerZone](aws-properties-codedeploy-deploymentconfig-minimumhealthyhostsperzone.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MonitorDurationInSeconds`  <a name="cfn-codedeploy-deploymentconfig-zonalconfig-monitordurationinseconds"></a>
The period of time, in seconds, that CodeDeploy must wait after completing a deployment to an Availability Zone. CodeDeploy will wait this amount of time before starting a deployment to the next Availability Zone. Consider adding a monitor duration to give the deployment some time to prove itself (or 'bake') in one Availability Zone before it is released in the next zone. If you don't specify a `monitorDurationInSeconds`, CodeDeploy starts deploying to the next Availability Zone immediately.  
For more information about the zonal configuration feature, see [zonal configuration](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations-create.html#zonal-config) in the *CodeDeploy User Guide*.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::CodeDeploy::DeploymentGroup
<a name="aws-resource-codedeploy-deploymentgroup"></a>

 The `AWS::CodeDeploy::DeploymentGroup` resource creates an AWS CodeDeploy deployment group that specifies which instances your application revisions are deployed to, along with other deployment options. For more information, see [CreateDeploymentGroup](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeploymentGroup.html) in the *CodeDeploy API Reference*. 

**Note**  
Amazon ECS blue/green deployments through CodeDeploy do not use the `AWS::CodeDeploy::DeploymentGroup` resource. To perform Amazon ECS blue/green deployments, use the `AWS::CodeDeploy::BlueGreen` hook. See [Perform Amazon ECS blue/green deployments through CodeDeploy using CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html) for more information. 

## Syntax
<a name="aws-resource-codedeploy-deploymentgroup-syntax"></a>

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

### JSON
<a name="aws-resource-codedeploy-deploymentgroup-syntax.json"></a>

```
{
  "Type" : "AWS::CodeDeploy::DeploymentGroup",
  "Properties" : {
      "[AlarmConfiguration](#cfn-codedeploy-deploymentgroup-alarmconfiguration)" : AlarmConfiguration,
      "[ApplicationName](#cfn-codedeploy-deploymentgroup-applicationname)" : String,
      "[AutoRollbackConfiguration](#cfn-codedeploy-deploymentgroup-autorollbackconfiguration)" : AutoRollbackConfiguration,
      "[AutoScalingGroups](#cfn-codedeploy-deploymentgroup-autoscalinggroups)" : [ String, ... ],
      "[BlueGreenDeploymentConfiguration](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration)" : BlueGreenDeploymentConfiguration,
      "[Deployment](#cfn-codedeploy-deploymentgroup-deployment)" : Deployment,
      "[DeploymentConfigName](#cfn-codedeploy-deploymentgroup-deploymentconfigname)" : String,
      "[DeploymentGroupName](#cfn-codedeploy-deploymentgroup-deploymentgroupname)" : String,
      "[DeploymentStyle](#cfn-codedeploy-deploymentgroup-deploymentstyle)" : DeploymentStyle,
      "[Ec2TagFilters](#cfn-codedeploy-deploymentgroup-ec2tagfilters)" : [ EC2TagFilter, ... ],
      "[Ec2TagSet](#cfn-codedeploy-deploymentgroup-ec2tagset)" : EC2TagSet,
      "[ECSServices](#cfn-codedeploy-deploymentgroup-ecsservices)" : [ ECSService, ... ],
      "[LoadBalancerInfo](#cfn-codedeploy-deploymentgroup-loadbalancerinfo)" : LoadBalancerInfo,
      "[OnPremisesInstanceTagFilters](#cfn-codedeploy-deploymentgroup-onpremisesinstancetagfilters)" : [ TagFilter, ... ],
      "[OnPremisesTagSet](#cfn-codedeploy-deploymentgroup-onpremisestagset)" : OnPremisesTagSet,
      "[OutdatedInstancesStrategy](#cfn-codedeploy-deploymentgroup-outdatedinstancesstrategy)" : String,
      "[ServiceRoleArn](#cfn-codedeploy-deploymentgroup-servicerolearn)" : String,
      "[Tags](#cfn-codedeploy-deploymentgroup-tags)" : [ Tag, ... ],
      "[TerminationHookEnabled](#cfn-codedeploy-deploymentgroup-terminationhookenabled)" : Boolean,
      "[TriggerConfigurations](#cfn-codedeploy-deploymentgroup-triggerconfigurations)" : [ TriggerConfig, ... ]
    }
}
```

### YAML
<a name="aws-resource-codedeploy-deploymentgroup-syntax.yaml"></a>

```
Type: AWS::CodeDeploy::DeploymentGroup
Properties:
  [AlarmConfiguration](#cfn-codedeploy-deploymentgroup-alarmconfiguration): 
    AlarmConfiguration
  [ApplicationName](#cfn-codedeploy-deploymentgroup-applicationname): String
  [AutoRollbackConfiguration](#cfn-codedeploy-deploymentgroup-autorollbackconfiguration): 
    AutoRollbackConfiguration
  [AutoScalingGroups](#cfn-codedeploy-deploymentgroup-autoscalinggroups): 
    - String
  [BlueGreenDeploymentConfiguration](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration): 
    BlueGreenDeploymentConfiguration
  [Deployment](#cfn-codedeploy-deploymentgroup-deployment): 
    Deployment
  [DeploymentConfigName](#cfn-codedeploy-deploymentgroup-deploymentconfigname): String
  [DeploymentGroupName](#cfn-codedeploy-deploymentgroup-deploymentgroupname): String
  [DeploymentStyle](#cfn-codedeploy-deploymentgroup-deploymentstyle): 
    DeploymentStyle
  [Ec2TagFilters](#cfn-codedeploy-deploymentgroup-ec2tagfilters): 
    - EC2TagFilter
  [Ec2TagSet](#cfn-codedeploy-deploymentgroup-ec2tagset): 
    EC2TagSet
  [ECSServices](#cfn-codedeploy-deploymentgroup-ecsservices): 
    - ECSService
  [LoadBalancerInfo](#cfn-codedeploy-deploymentgroup-loadbalancerinfo): 
    LoadBalancerInfo
  [OnPremisesInstanceTagFilters](#cfn-codedeploy-deploymentgroup-onpremisesinstancetagfilters): 
    - TagFilter
  [OnPremisesTagSet](#cfn-codedeploy-deploymentgroup-onpremisestagset): 
    OnPremisesTagSet
  [OutdatedInstancesStrategy](#cfn-codedeploy-deploymentgroup-outdatedinstancesstrategy): String
  [ServiceRoleArn](#cfn-codedeploy-deploymentgroup-servicerolearn): String
  [Tags](#cfn-codedeploy-deploymentgroup-tags): 
    - Tag
  [TerminationHookEnabled](#cfn-codedeploy-deploymentgroup-terminationhookenabled): Boolean
  [TriggerConfigurations](#cfn-codedeploy-deploymentgroup-triggerconfigurations): 
    - TriggerConfig
```

## Properties
<a name="aws-resource-codedeploy-deploymentgroup-properties"></a>

`AlarmConfiguration`  <a name="cfn-codedeploy-deploymentgroup-alarmconfiguration"></a>
Information about the Amazon CloudWatch alarms that are associated with the deployment group.  
*Required*: No  
*Type*: [AlarmConfiguration](aws-properties-codedeploy-deploymentgroup-alarmconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ApplicationName`  <a name="cfn-codedeploy-deploymentgroup-applicationname"></a>
 The name of an existing CodeDeploy application to associate this deployment group with.   
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`AutoRollbackConfiguration`  <a name="cfn-codedeploy-deploymentgroup-autorollbackconfiguration"></a>
 Information about the automatic rollback configuration that is associated with the deployment group. If you specify this property, don't specify the `Deployment` property.   
*Required*: No  
*Type*: [AutoRollbackConfiguration](aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutoScalingGroups`  <a name="cfn-codedeploy-deploymentgroup-autoscalinggroups"></a>
 A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created. Duplicates are not allowed.   
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BlueGreenDeploymentConfiguration`  <a name="cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration"></a>
Information about blue/green deployment options for a deployment group.  
*Required*: No  
*Type*: [BlueGreenDeploymentConfiguration](aws-properties-codedeploy-deploymentgroup-bluegreendeploymentconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Deployment`  <a name="cfn-codedeploy-deploymentgroup-deployment"></a>
 The application revision to deploy to this deployment group. If you specify this property, your target application revision is deployed as soon as the provisioning process is complete. If you specify this property, don't specify the `AutoRollbackConfiguration` property.   
*Required*: No  
*Type*: [Deployment](aws-properties-codedeploy-deploymentgroup-deployment.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeploymentConfigName`  <a name="cfn-codedeploy-deploymentgroup-deploymentconfigname"></a>
 A deployment configuration name or a predefined configuration name. With predefined configurations, you can deploy application revisions to one instance at a time (`CodeDeployDefault.OneAtATime`), half of the instances at a time (`CodeDeployDefault.HalfAtATime`), or all the instances at once (`CodeDeployDefault.AllAtOnce`). For more information and valid values, see [Working with Deployment Configurations](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html) in the *AWS CodeDeploy User Guide*.   
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeploymentGroupName`  <a name="cfn-codedeploy-deploymentgroup-deploymentgroupname"></a>
 A name for the deployment group. If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the deployment group name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).  
 If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. 
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DeploymentStyle`  <a name="cfn-codedeploy-deploymentgroup-deploymentstyle"></a>
 Attributes that determine the type of deployment to run and whether to route deployment traffic behind a load balancer.   
 If you specify this property with a blue/green deployment type, don't specify the `AutoScalingGroups`, `LoadBalancerInfo`, or `Deployment` properties.   
 For blue/green deployments, CloudFormation supports deployments on Lambda compute platforms only. You can perform Amazon ECS blue/green deployments using `AWS::CodeDeploy::BlueGreen ` hook. See [Perform Amazon ECS blue/green deployments through CodeDeploy using CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/blue-green.html) for more information. 
*Required*: No  
*Type*: [DeploymentStyle](aws-properties-codedeploy-deploymentgroup-deploymentstyle.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ec2TagFilters`  <a name="cfn-codedeploy-deploymentgroup-ec2tagfilters"></a>
 The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group. CodeDeploy includes all Amazon EC2 instances identified by any of the tags you specify in this deployment group. Duplicates are not allowed.   
 You can specify `EC2TagFilters` or `Ec2TagSet`, but not both.   
*Required*: No  
*Type*: Array of [EC2TagFilter](aws-properties-codedeploy-deploymentgroup-ec2tagfilter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ec2TagSet`  <a name="cfn-codedeploy-deploymentgroup-ec2tagset"></a>
Information about groups of tags applied to Amazon EC2 instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same call as `ec2TagFilter`.  
*Required*: No  
*Type*: [EC2TagSet](aws-properties-codedeploy-deploymentgroup-ec2tagset.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ECSServices`  <a name="cfn-codedeploy-deploymentgroup-ecsservices"></a>
 The target Amazon ECS services in the deployment group. This applies only to deployment groups that use the Amazon ECS compute platform. A target Amazon ECS service is specified as an Amazon ECS cluster and service name pair using the format `<clustername>:<servicename>`.   
*Required*: No  
*Type*: Array of [ECSService](aws-properties-codedeploy-deploymentgroup-ecsservice.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoadBalancerInfo`  <a name="cfn-codedeploy-deploymentgroup-loadbalancerinfo"></a>
Information about the load balancer to use in a deployment. For more information, see [ Integrating CodeDeploy with Elastic Load Balancing](https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-elastic-load-balancing.html) in the *AWS CodeDeploy User Guide*.  
*Required*: No  
*Type*: [LoadBalancerInfo](aws-properties-codedeploy-deploymentgroup-loadbalancerinfo.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OnPremisesInstanceTagFilters`  <a name="cfn-codedeploy-deploymentgroup-onpremisesinstancetagfilters"></a>
 The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. CodeDeploy includes all on-premises instances identified by any of the tags you specify in this deployment group. To register on-premises instances with CodeDeploy, see [Working with On-Premises Instances for CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-on-premises.html) in the *AWS CodeDeploy User Guide*. Duplicates are not allowed.   
 You can specify `OnPremisesInstanceTagFilters` or `OnPremisesInstanceTagSet`, but not both.   
*Required*: No  
*Type*: Array of [TagFilter](aws-properties-codedeploy-deploymentgroup-tagfilter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OnPremisesTagSet`  <a name="cfn-codedeploy-deploymentgroup-onpremisestagset"></a>
Information about groups of tags applied to on-premises instances. The deployment group includes only on-premises instances identified by all the tag groups.  
 You can specify `OnPremisesInstanceTagFilters` or `OnPremisesInstanceTagSet`, but not both.   
*Required*: No  
*Type*: [OnPremisesTagSet](aws-properties-codedeploy-deploymentgroup-onpremisestagset.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OutdatedInstancesStrategy`  <a name="cfn-codedeploy-deploymentgroup-outdatedinstancesstrategy"></a>
Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.  
If this option is set to `UPDATE` or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.  
If this option is set to `IGNORE`, CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.  
*Required*: No  
*Type*: String  
*Allowed values*: `UPDATE | IGNORE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceRoleArn`  <a name="cfn-codedeploy-deploymentgroup-servicerolearn"></a>
A service role Amazon Resource Name (ARN) that grants CodeDeploy permission to make calls to AWS services on your behalf. For more information, see [Create a Service Role for AWS CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/getting-started-create-service-role.html) in the *AWS CodeDeploy User Guide*.   
 In some cases, you might need to add a dependency on the service role's policy. For more information, see IAM role policy in [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html).
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-codedeploy-deploymentgroup-tags"></a>
 The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.   
*Required*: No  
*Type*: Array of [Tag](aws-properties-codedeploy-deploymentgroup-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TerminationHookEnabled`  <a name="cfn-codedeploy-deploymentgroup-terminationhookenabled"></a>
Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.  
For more information about the termination hook, see [How Amazon EC2 Auto Scaling works with CodeDeploy](https://docs.aws.amazon.com//codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors) in the *AWS CodeDeploy User Guide*.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TriggerConfigurations`  <a name="cfn-codedeploy-deploymentgroup-triggerconfigurations"></a>
Information about triggers associated with the deployment group. Duplicates are not allowed  
*Required*: No  
*Type*: Array of [TriggerConfig](aws-properties-codedeploy-deploymentgroup-triggerconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-codedeploy-deploymentgroup-return-values"></a>

### Ref
<a name="aws-resource-codedeploy-deploymentgroup-return-values-ref"></a>

When you pass the logical ID of an `AWS::CodeDeploy::DeploymentGroup` resource to the intrinsic `Ref` function, the function returns the deployment group name, such as `mydeploymentgroup-a123d0d1`.

For more information about using the `Ref` function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-codedeploy-deploymentgroup--examples"></a>



**Topics**
+ [Revision in GitHub](#aws-resource-codedeploy-deploymentgroup--examples--Revision_in_GitHub)
+ [Associate Amazon EC2 Instances](#aws-resource-codedeploy-deploymentgroup--examples--Associate_Instances)
+ [Deployment Style](#aws-resource-codedeploy-deploymentgroup--examples--Deployment_Style)
+ [Alarm and Trigger](#aws-resource-codedeploy-deploymentgroup--examples--Alarm_and_Trigger)
+ [Automatic Rollback Configuration](#aws-resource-codedeploy-deploymentgroup--examples--Automatic_Rollback_Configuration)
+ [Load Balancer](#aws-resource-codedeploy-deploymentgroup--examples--Load_Balancer)
+ [Target Group Info](#aws-resource-codedeploy-deploymentgroup--examples--Target_Group_Info)

### Revision in GitHub
<a name="aws-resource-codedeploy-deploymentgroup--examples--Revision_in_GitHub"></a>

The following example creates a deployment group that is associated with Auto Scaling groups and uses an application revision that is stored in a GitHub repository. You specify the repository information as input parameters.

#### JSON
<a name="aws-resource-codedeploy-deploymentgroup--examples--Revision_in_GitHub--json"></a>

```
"DeploymentGroup" : { 
    "Type" : "AWS::CodeDeploy::DeploymentGroup",
    "Properties" : { 
        "ApplicationName" : {"Ref" : "ApplicationName"}, 
        "AutoScalingGroups" : [{"Ref" : "CodeDeployAutoScalingGroups" } ], 
        "Deployment" : { 
            "Description" : "A sample deployment", 
            "IgnoreApplicationStopFailures" : "true", 
            "Revision" : { 
                "RevisionType" : "GitHub", 
                "GitHubLocation" : { 
                    "CommitId" : {"Ref" : "CommitId"}, 
                    "Repository" : {"Ref" : "Repository"} 
                } 
            } 
        }, 
        "ServiceRoleArn" : { 
            "Fn::GetAtt" : [ 
                "RoleArn", 
                "Arn" 
            ] 
        } 
    }
}
```

#### YAML
<a name="aws-resource-codedeploy-deploymentgroup--examples--Revision_in_GitHub--yaml"></a>

```
DeploymentGroup: 
  Type: AWS::CodeDeploy::DeploymentGroup 
  Properties:
    ApplicationName: 
      Ref: "ApplicationName" 
    AutoScalingGroups: 
      Ref: CodeDeployAutoScalingGroups 
    Deployment: 
      Description: "A sample deployment"
      IgnoreApplicationStopFailures: true 
      Revision: 
        RevisionType: GitHub 
        GitHubLocation: 
          CommitId:
            Ref: CommitId 
          Repository: 
            Ref: Repository 
    ServiceRoleArn: 
      Fn::GetAtt: [ RoleArn, Arn ]
```

### Associate Amazon EC2 Instances
<a name="aws-resource-codedeploy-deploymentgroup--examples--Associate_Instances"></a>

The following example creates a deployment group that uses instance tags to associate Amazon EC2 instances with the deployment group. The deployment group uses an application revision that is stored in an Amazon S3 bucket.

#### JSON
<a name="aws-resource-codedeploy-deploymentgroup--examples--Associate_Instances--json"></a>

```
"DeploymentGroup": {
    "Type": "AWS::CodeDeploy::DeploymentGroup",
    "Properties": {
        "ApplicationName": {
            "Ref": "Application"
        },
        "Deployment": {
            "Description": "First time",
            "IgnoreApplicationStopFailures": "true",
            "Revision": {
                "RevisionType": "S3",
                "S3Location": {
                    "Bucket": {
                        "Ref": "Bucket"
                    },
                    "Key": {
                        "Ref": "Key"
                    },
                    "BundleType": "Zip",
                    "ETag": {
                        "Ref": "ETag"
                    },
                    "Version": {
                        "Ref": "Version"
                    }
                }
            }
        },
        "Ec2TagFilters": [
            {
                "Key": {
                    "Ref": "TagKey"
                },
                "Value": {
                    "Ref": "TagValue"
                },
                "Type": "KEY_AND_VALUE"
            }
        ],
        "ServiceRoleArn": {
            "Fn::GetAtt": [
                "RoleArn",
                "Arn"
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-codedeploy-deploymentgroup--examples--Associate_Instances--yaml"></a>

```
DeploymentGroup: 
  Type: AWS::CodeDeploy::DeploymentGroup 
  Properties:
    ApplicationName: 
      Ref: "Application" 
    Deployment: 
      Description: "First time"
      IgnoreApplicationStopFailures: true 
      Revision: 
        RevisionType: S3 
        S3Location: 
          Bucket: 
            Ref: Bucket 
          Key: 
            Ref: Key 
          BundleType: Zip 
          ETag: 
            Ref: ETag 
          Version: 
            Ref: Version 
      Ec2TagFilters: 
        -
        Key: 
          Ref: TagKey 
        Value: 
          Ref: TagValue 
        Type: "KEY_AND_VALUE" 
      ServiceRoleArn: 
        Fn::GetAtt: [ RoleArn, Arn ]
```

### Deployment Style
<a name="aws-resource-codedeploy-deploymentgroup--examples--Deployment_Style"></a>

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

#### JSON
<a name="aws-resource-codedeploy-deploymentgroup--examples--Deployment_Style--json"></a>

```
"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
<a name="aws-resource-codedeploy-deploymentgroup--examples--Deployment_Style--yaml"></a>

```
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 ]
```

### Alarm and Trigger
<a name="aws-resource-codedeploy-deploymentgroup--examples--Alarm_and_Trigger"></a>

The following example configures a billing alarm and a notification trigger for the deployment group.

#### JSON
<a name="aws-resource-codedeploy-deploymentgroup--examples--Alarm_and_Trigger--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "EC2TagKey0": {
            "Type": "String",
            "Default": "ec2TagKey0"
        },
        "EC2TagValue0": {
            "Type": "String",
            "Default": "ec2TagValue0"
        },
        "EC2TagKey1": {
            "Type": "String",
            "Default": "ec2TagKey1"
        },
        "EC2TagValue1": {
            "Type": "String",
            "Default": "ec2TagValue1"
        },
        "CodeDeployServiceRole": {
            "Type": "String"
        },
        "DeploymentGroupName": {
            "Type": "String"
        }
    },
    "Resources": {
        "myAlarm": {
            "Type": "AWS::CloudWatch::Alarm",
            "Properties": {
                "Namespace": "AWS/Billing",
                "MetricName": "EstimatedCharges",
                "Statistic": "Maximum",
                "Period": "21600",
                "EvaluationPeriods": "1",
                "Threshold": 1000,
                "ComparisonOperator": "GreaterThanThreshold"
            }
        },
        "mySNSTopic": {
            "Type": "AWS::SNS::Topic",
            "Properties": {}
        },
        "Application": {
            "Type": "AWS::CodeDeploy::Application"
        },
        "DeploymentConfig": {
            "Type": "AWS::CodeDeploy::DeploymentConfig",
            "Properties": {
                "MinimumHealthyHosts": {
                    "Type": "FLEET_PERCENT",
                    "Value": "25"
                }
            }
        },
        "DeploymentGroup": {
            "Type": "AWS::CodeDeploy::DeploymentGroup",
            "Properties": {
                "AlarmConfiguration": {
                    "Alarms": [
                        {
                            "Name": {
                                "Ref": "myAlarm"
                            }
                        }
                    ]
                },
                "ApplicationName": {
                    "Ref": "Application"
                },
                "DeploymentConfigName": {
                    "Ref": "DeploymentConfig"
                },
                "DeploymentGroupName": {
                    "Ref": "DeploymentGroupName"
                },
                "Ec2TagFilters": [
                    {
                        "Key": {
                            "Ref": "EC2TagKey0"
                        },
                        "Value": {
                            "Ref": "EC2TagValue0"
                        },
                        "Type": "KEY_AND_VALUE"
                    },
                    {
                        "Key": {
                            "Ref": "EC2TagKey1"
                        },
                        "Type": "KEY_ONLY"
                    },
                    {
                        "Value": {
                            "Ref": "EC2TagValue1"
                        },
                        "Type": "VALUE_ONLY"
                    }
                ],
                "ServiceRoleArn": {
                    "Fn::GetAtt": [
                        "CodeDeployServiceRole",
                        "Arn"
                    ]
                },
                "TriggerConfigurations": [
                    {
                        "TriggerEvents": [
                            "DeploymentSuccess",
                            "DeploymentRollback"
                        ],
                        "TriggerName": "MyTarget",
                        "TriggerTargetArn": {
                            "Ref": "mySNSTopic"
                        }
                    }
                ]
            }
        }
    }
}
```

### Automatic Rollback Configuration
<a name="aws-resource-codedeploy-deploymentgroup--examples--Automatic_Rollback_Configuration"></a>

The following example configures automatic rollback for the deployment group.

#### YAML
<a name="aws-resource-codedeploy-deploymentgroup--examples--Automatic_Rollback_Configuration--yaml"></a>

```
Parameters:
  EC2TagKey0:
    Type: String
    Default: ec2TagKey0
  EC2TagValue0:
    Type: String
    Default: ec2TagValue0
  EC2TagKey1:
    Type: String
    Default: ec2TagKey1
  EC2TagValue1:
    Type: String
    Default: ec2TagValue1
  CodeDeployServiceRole:
    Type: String
  DeploymentGroupName:
    Type: String
Resources:
  myAlarm:
    Type: AWS::CloudWatch::Alarm
    Properties:
      Namespace: AWS/Billing
      MetricName: EstimatedCharges
      Statistic: Maximum
      Period: '21600'
      EvaluationPeriods: '1'
      Threshold: 1000
      ComparisonOperator: GreaterThanThreshold
  mySNSTopic:
    Type: AWS::SNS::Topic
    Properties: {}
  Application:
    Type: AWS::CodeDeploy::Application
  DeploymentConfig:
    Type: AWS::CodeDeploy::DeploymentConfig
    Properties:
      MinimumHealthyHosts:
        Type: FLEET_PERCENT
        Value: '25'
  DeploymentGroup:
    Type: AWS::CodeDeploy::DeploymentGroup
    Properties:
      AlarmConfiguration:
        Alarms:
          - Name: !Ref myAlarm
      ApplicationName: !Ref Application
      AutoRollbackConfiguration:
        Enabled: 'true'
        Events:
          - DEPLOYMENT_FAILURE
      DeploymentConfigName: !Ref DeploymentConfig
      DeploymentGroupName: !Ref DeploymentGroupName
      Ec2TagFilters:
        - Key: !Ref EC2TagKey0
          Value: !Ref EC2TagValue0
          Type: KEY_AND_VALUE
        - Key: !Ref EC2TagKey1
          Type: KEY_ONLY
        - Value: !Ref EC2TagValue1
          Type: VALUE_ONLY
      ServiceRoleArn: !GetAtt CodeDeployServiceRole.Arn
      TriggerConfigurations:
        - TriggerEvents:
            - DeploymentSuccess
            - DeploymentRollback
          TriggerName: MyTarget
          TriggerTargetArn: !Ref mySNSTopic
```

#### JSON
<a name="aws-resource-codedeploy-deploymentgroup--examples--Automatic_Rollback_Configuration--json"></a>

```
{
  "Parameters": {
    "EC2TagKey0": {
      "Type": "String",
      "Default": "ec2TagKey0"
    },
    "EC2TagValue0": {
      "Type": "String",
      "Default": "ec2TagValue0"
    },
    "EC2TagKey1": {
      "Type": "String",
      "Default": "ec2TagKey1"
    },
    "EC2TagValue1": {
      "Type": "String",
      "Default": "ec2TagValue1"
    },
    "CodeDeployServiceRole": {
      "Type": "String"
    },
    "DeploymentGroupName": {
      "Type": "String"
    }
  },
  "Resources": {
    "myAlarm": {
      "Type": "AWS::CloudWatch::Alarm",
      "Properties": {
        "Namespace": "AWS/Billing",
        "MetricName": "EstimatedCharges",
        "Statistic": "Maximum",
        "Period": "21600",
        "EvaluationPeriods": "1",
        "Threshold": 1000,
        "ComparisonOperator": "GreaterThanThreshold"
      }
    },
    "mySNSTopic": {
      "Type": "AWS::SNS::Topic",
      "Properties": {}
    },
    "Application": {
      "Type": "AWS::CodeDeploy::Application"
    },
    "DeploymentConfig": {
      "Type": "AWS::CodeDeploy::DeploymentConfig",
      "Properties": {
        "MinimumHealthyHosts": {
          "Type": "FLEET_PERCENT",
          "Value": "25"
        }
      }
    },
    "DeploymentGroup": {
      "Type": "AWS::CodeDeploy::DeploymentGroup",
      "Properties": {
        "AlarmConfiguration": {
          "Alarms": [
            {
              "Name": { "Ref": "myAlarm" }
            }
          ]
        },
        "ApplicationName": {
          "Ref": "Application"
        },
        "AutoRollbackConfiguration": {
          "Enabled": "true",
          "Events": [ "DEPLOYMENT_FAILURE" ]
        },
        "DeploymentConfigName": {
          "Ref": "DeploymentConfig"
        },
        "DeploymentGroupName": {
          "Ref": "DeploymentGroupName"
        },
        "Ec2TagFilters": [
          {
            "Key": {
              "Ref": "EC2TagKey0"
            },
            "Value": {
              "Ref": "EC2TagValue0"
            },
            "Type": "KEY_AND_VALUE"
          },
          {
            "Key": {
              "Ref": "EC2TagKey1"
            },
            "Type": "KEY_ONLY"
          },
          {
            "Value": {
              "Ref": "EC2TagValue1"
            },
            "Type": "VALUE_ONLY"
          }
        ],
        "ServiceRoleArn": {
          "Fn::GetAtt": [
            "CodeDeployServiceRole",
            "Arn"
          ]
        },
        "TriggerConfigurations": [
          {
            "TriggerEvents": [ "DeploymentSuccess", "DeploymentRollback" ],
            "TriggerName": "MyTarget",
            "TriggerTargetArn": { "Ref": "mySNSTopic" }
          }
        ]
      }
    }
  }
}
```

### Load Balancer
<a name="aws-resource-codedeploy-deploymentgroup--examples--Load_Balancer"></a>

The following example configures an Elastic Load Balancing load balancer for the deployment group.

#### YAML
<a name="aws-resource-codedeploy-deploymentgroup--examples--Load_Balancer--yaml"></a>

```
Parameters:
  EC2TagKey0:
    Type: String
    Default: ec2TagKey0
  EC2TagValue0:
    Type: String
    Default: ec2TagValue0
  EC2TagKey1:
    Type: String
    Default: ec2TagKey1
  EC2TagValue1:
    Type: String
    Default: ec2TagValue1
  CodeDeployServiceRole:
    Type: String
  DeploymentGroupName:
    Type: String
  VpcCidr:
    Type: String
  SubnetCidr:
    Type: String
Resources:
  myVpc:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: !Ref VpcCidr
  mySubnet:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref myVpc
      CidrBlock: !Ref SubnetCidr
  InternetGateway:
    Type: AWS::EC2::InternetGateway
  AttachGateway:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: !Ref myVpc
      InternetGatewayId: !Ref InternetGateway
  myELB:
    Type: AWS::ElasticLoadBalancing::LoadBalancer
    Properties:
      Listeners:
        - InstancePort: '8000'
          LoadBalancerPort: '80'
          Protocol: HTTP
      Subnets:
        - !Ref mySubnet
  mySNSTopic:
    Type: AWS::SNS::Topic
    Properties: {}
  Application:
    Type: AWS::CodeDeploy::Application
  DeploymentConfig:
    Type: AWS::CodeDeploy::DeploymentConfig
    Properties:
      MinimumHealthyHosts:
        Type: FLEET_PERCENT
        Value: '25'
  DeploymentGroup:
    Type: AWS::CodeDeploy::DeploymentGroup
    Properties:
      ApplicationName: !Ref Application
      DeploymentConfigName: !Ref DeploymentConfig
      DeploymentGroupName: !Ref DeploymentGroupName
      Ec2TagFilters:
        - Key: !Ref EC2TagKey0
          Value: !Ref EC2TagValue0
          Type: KEY_AND_VALUE
        - Key: !Ref EC2TagKey1
          Type: KEY_ONLY
      LoadBalancerInfo:
        ElbInfoList:
          - Name: !Ref myELB
      DeploymentStyle:
        DeploymentOption: WITH_TRAFFIC_CONTROL
      ServiceRoleArn: !GetAtt CodeDeployServiceRole.Arn
      TriggerConfigurations:
        - TriggerEvents:
            - DeploymentSuccess
            - DeploymentFailure
          TriggerName: MyTarget
          TriggerTargetArn: !Ref mySNSTopic
Outputs:
  ELB:
    Description: ELB for DeploymentGroup
    Value: !Ref myELB
```

#### JSON
<a name="aws-resource-codedeploy-deploymentgroup--examples--Load_Balancer--json"></a>

```
{
  "Parameters": {
    "EC2TagKey0": {
      "Type": "String",
      "Default": "ec2TagKey0"
    },
    "EC2TagValue0": {
      "Type": "String",
      "Default": "ec2TagValue0"
    },
    "EC2TagKey1": {
      "Type": "String",
      "Default": "ec2TagKey1"
    },
    "EC2TagValue1": {
      "Type": "String",
      "Default": "ec2TagValue1"
    },
    "CodeDeployServiceRole": {
      "Type": "String"
    },
    "DeploymentGroupName": {
      "Type": "String"
    },
    "VpcCidr": {
      "Type": "String"
    },
    "SubnetCidr": {
      "Type": "String"
    }
  },
  "Resources": {
    "myVpc": {
      "Type": "AWS::EC2::VPC",
      "Properties": {
        "CidrBlock": { "Ref": "VpcCidr" }
      }
    },
    "mySubnet" : {
      "Type" : "AWS::EC2::Subnet",
      "Properties" : {
        "VpcId" : { "Ref" : "myVpc" },
        "CidrBlock" : { "Ref": "SubnetCidr" }
      }
    },
    "InternetGateway" : {
      "Type" : "AWS::EC2::InternetGateway"
    },
    "AttachGateway" : {
      "Type" : "AWS::EC2::VPCGatewayAttachment",
      "Properties" : {
        "VpcId" : { "Ref" : "myVpc" },
        "InternetGatewayId" : { "Ref" : "InternetGateway" }
      }
    },
    "myELB": {
      "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
      "Properties": {
        "Listeners": [{
          "InstancePort": "8000",
          "LoadBalancerPort": "80",
          "Protocol": "HTTP"
        }],
        "Subnets": [ { "Ref" : "mySubnet" } ]
      }
    },
    "mySNSTopic": {
      "Type": "AWS::SNS::Topic",
      "Properties": {}
    },
    "Application": {
      "Type": "AWS::CodeDeploy::Application"
    },
    "DeploymentConfig": {
      "Type": "AWS::CodeDeploy::DeploymentConfig",
      "Properties": {
        "MinimumHealthyHosts": {
          "Type": "FLEET_PERCENT",
          "Value": "25"
        }
      }
    },
    "DeploymentGroup": {
      "Type": "AWS::CodeDeploy::DeploymentGroup",
      "Properties": {
        "ApplicationName": {
          "Ref": "Application"
        },
        "DeploymentConfigName": {
          "Ref": "DeploymentConfig"
        },
        "DeploymentGroupName": {
          "Ref": "DeploymentGroupName"
        },
        "Ec2TagFilters": [
          {
            "Key": {
              "Ref": "EC2TagKey0"
            },
            "Value": {
              "Ref": "EC2TagValue0"
            },
            "Type": "KEY_AND_VALUE"
          },
          {
            "Key": {
              "Ref": "EC2TagKey1"
            },
            "Type": "KEY_ONLY"
          }
        ],
        "LoadBalancerInfo": {
          "ElbInfoList": [{
            "Name": { "Ref" : "myELB" }
          }]
        },
        "DeploymentStyle": {
          "DeploymentOption": "WITH_TRAFFIC_CONTROL"
        },
        "ServiceRoleArn": {
          "Fn::GetAtt": [
            "CodeDeployServiceRole", 
            "Arn"
          ]
        },
        "TriggerConfigurations": [
          {
            "TriggerEvents": [ "DeploymentSuccess", "DeploymentFailure" ],
            "TriggerName": "MyTarget",
            "TriggerTargetArn": { "Ref": "mySNSTopic" }
          }
        ]
      }
    }
  },
  "Outputs": {
    "ELB": {
      "Description": "ELB for DeploymentGroup",
      "Value" : { "Ref" : "myELB" }
    }
  }
}
```

### Target Group Info
<a name="aws-resource-codedeploy-deploymentgroup--examples--Target_Group_Info"></a>

The following example specifies the target group to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.

#### YAML
<a name="aws-resource-codedeploy-deploymentgroup--examples--Target_Group_Info--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  AppDeploymentGroup:
    Type: AWS::CodeDeploy::DeploymentGroup
    Properties:
      ApplicationName: MyApp
      DeploymentStyle:
        DeploymentOption: WITH_TRAFFIC_CONTROL
      LoadBalancerInfo:
        TargetGroupInfoList:
          - Name: !GetAtt MyTargetGroup.TargetGroupName
      ServiceRoleArn: 'arn:aws:iam::12345678:role/CodeDeployServiceRole'
```

#### JSON
<a name="aws-resource-codedeploy-deploymentgroup--examples--Target_Group_Info--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "AppDeploymentGroup": {
            "Type": "AWS::CodeDeploy::DeploymentGroup",
            "Properties": {
                "ApplicationName": "MyApp",
                "DeploymentStyle": {
                    "DeploymentOption": "WITH_TRAFFIC_CONTROL"
                },
                "LoadBalancerInfo": {
                    "TargetGroupInfoList": [
                        {
                            "Name": { "Fn::GetAtt": ["MyTargetGroup", "TargetGroupName"] }
                        }
                    ]
                },
                "ServiceRoleArn": "arn:aws:iam::12345678:role/CodeDeployServiceRole"
            }
        }
    }
}
```

# AWS::CodeDeploy::DeploymentGroup Alarm
<a name="aws-properties-codedeploy-deploymentgroup-alarm"></a>

 The `Alarm` property type specifies a CloudWatch alarm to use for an AWS CodeDeploy deployment group. The `Alarm` property of the [ CodeDeploy DeploymentGroup AlarmConfiguration ](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html) property contains a list of `Alarm` property types. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-alarm-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-alarm-syntax.json"></a>

```
{
  "[Name](#cfn-codedeploy-deploymentgroup-alarm-name)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-alarm-syntax.yaml"></a>

```
  [Name](#cfn-codedeploy-deploymentgroup-alarm-name): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-alarm-properties"></a>

`Name`  <a name="cfn-codedeploy-deploymentgroup-alarm-name"></a>
The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup AlarmConfiguration
<a name="aws-properties-codedeploy-deploymentgroup-alarmconfiguration"></a>

 The `AlarmConfiguration` property type configures CloudWatch alarms for an AWS CodeDeploy deployment group. `AlarmConfiguration` is a property of the [DeploymentGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html) resource. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-alarmconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-alarmconfiguration-syntax.json"></a>

```
{
  "[Alarms](#cfn-codedeploy-deploymentgroup-alarmconfiguration-alarms)" : [ Alarm, ... ],
  "[Enabled](#cfn-codedeploy-deploymentgroup-alarmconfiguration-enabled)" : Boolean,
  "[IgnorePollAlarmFailure](#cfn-codedeploy-deploymentgroup-alarmconfiguration-ignorepollalarmfailure)" : Boolean
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-alarmconfiguration-syntax.yaml"></a>

```
  [Alarms](#cfn-codedeploy-deploymentgroup-alarmconfiguration-alarms): 
    - Alarm
  [Enabled](#cfn-codedeploy-deploymentgroup-alarmconfiguration-enabled): Boolean
  [IgnorePollAlarmFailure](#cfn-codedeploy-deploymentgroup-alarmconfiguration-ignorepollalarmfailure): Boolean
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-alarmconfiguration-properties"></a>

`Alarms`  <a name="cfn-codedeploy-deploymentgroup-alarmconfiguration-alarms"></a>
A list of alarms configured for the deployment or deployment group. A maximum of 10 alarms can be added.  
*Required*: No  
*Type*: Array of [Alarm](aws-properties-codedeploy-deploymentgroup-alarm.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-codedeploy-deploymentgroup-alarmconfiguration-enabled"></a>
Indicates whether the alarm configuration is enabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IgnorePollAlarmFailure`  <a name="cfn-codedeploy-deploymentgroup-alarmconfiguration-ignorepollalarmfailure"></a>
Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is `false`.  
+ `true`: The deployment proceeds even if alarm status information can't be retrieved from CloudWatch.
+ `false`: The deployment stops if alarm status information can't be retrieved from CloudWatch.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup AutoRollbackConfiguration
<a name="aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration"></a>

The `AutoRollbackConfiguration` property type configures automatic rollback for an AWS CodeDeploy deployment group when a deployment is not completed successfully. For more information, see [Automatic Rollbacks](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployments-rollback-and-redeploy.html#deployments-rollback-and-redeploy-automatic-rollbacks) in the *AWS CodeDeploy User Guide*.

`AutoRollbackConfiguration` is a property of the [DeploymentGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html) resource. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration-syntax.json"></a>

```
{
  "[Enabled](#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled)" : Boolean,
  "[Events](#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration-syntax.yaml"></a>

```
  [Enabled](#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled): Boolean
  [Events](#cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events): 
    - String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-autorollbackconfiguration-properties"></a>

`Enabled`  <a name="cfn-codedeploy-deploymentgroup-autorollbackconfiguration-enabled"></a>
Indicates whether a defined automatic rollback configuration is currently enabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Events`  <a name="cfn-codedeploy-deploymentgroup-autorollbackconfiguration-events"></a>
 The event type or types that trigger a rollback. Valid values are `DEPLOYMENT_FAILURE`, `DEPLOYMENT_STOP_ON_ALARM`, or `DEPLOYMENT_STOP_ON_REQUEST`.   
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup BlueGreenDeploymentConfiguration
<a name="aws-properties-codedeploy-deploymentgroup-bluegreendeploymentconfiguration"></a>

Information about blue/green deployment options for a deployment group.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-syntax.json"></a>

```
{
  "[DeploymentReadyOption](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-deploymentreadyoption)" : DeploymentReadyOption,
  "[GreenFleetProvisioningOption](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-greenfleetprovisioningoption)" : GreenFleetProvisioningOption,
  "[TerminateBlueInstancesOnDeploymentSuccess](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-terminateblueinstancesondeploymentsuccess)" : BlueInstanceTerminationOption
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-syntax.yaml"></a>

```
  [DeploymentReadyOption](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-deploymentreadyoption): 
    DeploymentReadyOption
  [GreenFleetProvisioningOption](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-greenfleetprovisioningoption): 
    GreenFleetProvisioningOption
  [TerminateBlueInstancesOnDeploymentSuccess](#cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-terminateblueinstancesondeploymentsuccess): 
    BlueInstanceTerminationOption
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-properties"></a>

`DeploymentReadyOption`  <a name="cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-deploymentreadyoption"></a>
Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.  
*Required*: No  
*Type*: [DeploymentReadyOption](aws-properties-codedeploy-deploymentgroup-deploymentreadyoption.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`GreenFleetProvisioningOption`  <a name="cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-greenfleetprovisioningoption"></a>
Information about how instances are provisioned for a replacement environment in a blue/green deployment.  
*Required*: No  
*Type*: [GreenFleetProvisioningOption](aws-properties-codedeploy-deploymentgroup-greenfleetprovisioningoption.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TerminateBlueInstancesOnDeploymentSuccess`  <a name="cfn-codedeploy-deploymentgroup-bluegreendeploymentconfiguration-terminateblueinstancesondeploymentsuccess"></a>
Information about whether to terminate instances in the original fleet during a blue/green deployment.  
*Required*: No  
*Type*: [BlueInstanceTerminationOption](aws-properties-codedeploy-deploymentgroup-blueinstanceterminationoption.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup BlueInstanceTerminationOption
<a name="aws-properties-codedeploy-deploymentgroup-blueinstanceterminationoption"></a>

Information about whether instances in the original environment are terminated when a blue/green deployment is successful. `BlueInstanceTerminationOption` does not apply to Lambda deployments. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-blueinstanceterminationoption-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-blueinstanceterminationoption-syntax.json"></a>

```
{
  "[Action](#cfn-codedeploy-deploymentgroup-blueinstanceterminationoption-action)" : String,
  "[TerminationWaitTimeInMinutes](#cfn-codedeploy-deploymentgroup-blueinstanceterminationoption-terminationwaittimeinminutes)" : Integer
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-blueinstanceterminationoption-syntax.yaml"></a>

```
  [Action](#cfn-codedeploy-deploymentgroup-blueinstanceterminationoption-action): String
  [TerminationWaitTimeInMinutes](#cfn-codedeploy-deploymentgroup-blueinstanceterminationoption-terminationwaittimeinminutes): Integer
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-blueinstanceterminationoption-properties"></a>

`Action`  <a name="cfn-codedeploy-deploymentgroup-blueinstanceterminationoption-action"></a>
The action to take on instances in the original environment after a successful blue/green deployment.  
+ `TERMINATE`: Instances are terminated after a specified wait time.
+ `KEEP_ALIVE`: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.
*Required*: No  
*Type*: String  
*Allowed values*: `TERMINATE | KEEP_ALIVE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TerminationWaitTimeInMinutes`  <a name="cfn-codedeploy-deploymentgroup-blueinstanceterminationoption-terminationwaittimeinminutes"></a>
For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.  
 For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set.   
 The maximum setting is 2880 minutes (2 days).   
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup Deployment
<a name="aws-properties-codedeploy-deploymentgroup-deployment"></a>

`Deployment` is a property of the [DeploymentGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html) resource that specifies an AWS CodeDeploy application revision to be deployed to instances in the deployment group. If you specify an application revision, your target revision is deployed as soon as the provisioning process is complete. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-deployment-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-deployment-syntax.json"></a>

```
{
  "[Description](#cfn-codedeploy-deploymentgroup-deployment-description)" : String,
  "[IgnoreApplicationStopFailures](#cfn-codedeploy-deploymentgroup-deployment-ignoreapplicationstopfailures)" : Boolean,
  "[Revision](#cfn-codedeploy-deploymentgroup-deployment-revision)" : RevisionLocation
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-deployment-syntax.yaml"></a>

```
  [Description](#cfn-codedeploy-deploymentgroup-deployment-description): String
  [IgnoreApplicationStopFailures](#cfn-codedeploy-deploymentgroup-deployment-ignoreapplicationstopfailures): Boolean
  [Revision](#cfn-codedeploy-deploymentgroup-deployment-revision): 
    RevisionLocation
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-deployment-properties"></a>

`Description`  <a name="cfn-codedeploy-deploymentgroup-deployment-description"></a>
A comment about the deployment.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IgnoreApplicationStopFailures`  <a name="cfn-codedeploy-deploymentgroup-deployment-ignoreapplicationstopfailures"></a>
 If true, then if an `ApplicationStop`, `BeforeBlockTraffic`, or `AfterBlockTraffic` deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if `ApplicationStop` fails, the deployment continues with DownloadBundle. If `BeforeBlockTraffic` fails, the deployment continues with `BlockTraffic`. If `AfterBlockTraffic` fails, the deployment continues with `ApplicationStop`.   
 If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.   
 During a deployment, the AWS CodeDeploy agent runs the scripts specified for `ApplicationStop`, `BeforeBlockTraffic`, and `AfterBlockTraffic` in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.   
 If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use `ignoreApplicationStopFailures` to specify that the `ApplicationStop`, `BeforeBlockTraffic`, and `AfterBlockTraffic` failures should be ignored.   
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Revision`  <a name="cfn-codedeploy-deploymentgroup-deployment-revision"></a>
Information about the location of stored application artifacts and the service from which to retrieve them.  
*Required*: Yes  
*Type*: [RevisionLocation](aws-properties-codedeploy-deploymentgroup-revisionlocation.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup DeploymentReadyOption
<a name="aws-properties-codedeploy-deploymentgroup-deploymentreadyoption"></a>

Information about how traffic is rerouted to instances in a replacement environment in a blue/green deployment.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-deploymentreadyoption-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-deploymentreadyoption-syntax.json"></a>

```
{
  "[ActionOnTimeout](#cfn-codedeploy-deploymentgroup-deploymentreadyoption-actionontimeout)" : String,
  "[WaitTimeInMinutes](#cfn-codedeploy-deploymentgroup-deploymentreadyoption-waittimeinminutes)" : Integer
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-deploymentreadyoption-syntax.yaml"></a>

```
  [ActionOnTimeout](#cfn-codedeploy-deploymentgroup-deploymentreadyoption-actionontimeout): String
  [WaitTimeInMinutes](#cfn-codedeploy-deploymentgroup-deploymentreadyoption-waittimeinminutes): Integer
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-deploymentreadyoption-properties"></a>

`ActionOnTimeout`  <a name="cfn-codedeploy-deploymentgroup-deploymentreadyoption-actionontimeout"></a>
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.  
+ CONTINUE\$1DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.
+ STOP\$1DEPLOYMENT: Do not register new instances with a load balancer unless traffic rerouting is started using [ContinueDeployment ](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ContinueDeployment.html). If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.
*Required*: No  
*Type*: String  
*Allowed values*: `CONTINUE_DEPLOYMENT | STOP_DEPLOYMENT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`WaitTimeInMinutes`  <a name="cfn-codedeploy-deploymentgroup-deploymentreadyoption-waittimeinminutes"></a>
The number of minutes to wait before the status of a blue/green deployment is changed to Stopped if rerouting is not started manually. Applies only to the `STOP_DEPLOYMENT` option for `actionOnTimeout`.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup DeploymentStyle
<a name="aws-properties-codedeploy-deploymentgroup-deploymentstyle"></a>

Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-deploymentstyle-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-deploymentstyle-syntax.json"></a>

```
{
  "[DeploymentOption](#cfn-codedeploy-deploymentgroup-deploymentstyle-deploymentoption)" : String,
  "[DeploymentType](#cfn-codedeploy-deploymentgroup-deploymentstyle-deploymenttype)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-deploymentstyle-syntax.yaml"></a>

```
  [DeploymentOption](#cfn-codedeploy-deploymentgroup-deploymentstyle-deploymentoption): String
  [DeploymentType](#cfn-codedeploy-deploymentgroup-deploymentstyle-deploymenttype): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-deploymentstyle-properties"></a>

`DeploymentOption`  <a name="cfn-codedeploy-deploymentgroup-deploymentstyle-deploymentoption"></a>
Indicates whether to route deployment traffic behind a load balancer.  
 An Amazon EC2Application Load Balancer or Network Load Balancer is required for an Amazon ECS deployment. 
*Required*: No  
*Type*: String  
*Allowed values*: `WITH_TRAFFIC_CONTROL | WITHOUT_TRAFFIC_CONTROL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeploymentType`  <a name="cfn-codedeploy-deploymentgroup-deploymentstyle-deploymenttype"></a>
Indicates whether to run an in-place or blue/green deployment.  
*Required*: No  
*Type*: String  
*Allowed values*: `IN_PLACE | BLUE_GREEN`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-codedeploy-deploymentgroup-deploymentstyle--seealso"></a>
+ [EC2TagFilter](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_EC2TagFilter.html) in the *AWS CodeDeploy API Reference*.



# AWS::CodeDeploy::DeploymentGroup EC2TagFilter
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagfilter"></a>

Information about an Amazon EC2 tag filter.

For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see [ Tagging Instances for Deployment Groups in AWS CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html) in the *AWS CodeDeploy User Guide*.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagfilter-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagfilter-syntax.json"></a>

```
{
  "[Key](#cfn-codedeploy-deploymentgroup-ec2tagfilter-key)" : String,
  "[Type](#cfn-codedeploy-deploymentgroup-ec2tagfilter-type)" : String,
  "[Value](#cfn-codedeploy-deploymentgroup-ec2tagfilter-value)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagfilter-syntax.yaml"></a>

```
  [Key](#cfn-codedeploy-deploymentgroup-ec2tagfilter-key): String
  [Type](#cfn-codedeploy-deploymentgroup-ec2tagfilter-type): String
  [Value](#cfn-codedeploy-deploymentgroup-ec2tagfilter-value): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagfilter-properties"></a>

`Key`  <a name="cfn-codedeploy-deploymentgroup-ec2tagfilter-key"></a>
The tag filter key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-codedeploy-deploymentgroup-ec2tagfilter-type"></a>
The tag filter type:  
+ `KEY_ONLY`: Key only.
+ `VALUE_ONLY`: Value only.
+ `KEY_AND_VALUE`: Key and value.
*Required*: No  
*Type*: String  
*Allowed values*: `KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-codedeploy-deploymentgroup-ec2tagfilter-value"></a>
The tag filter value.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup EC2TagSet
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagset"></a>

 The `EC2TagSet` property type specifies information about groups of tags applied to Amazon EC2 instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups. `EC2TagSet` cannot be used in the same template as `EC2TagFilter`. 

 For information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see [Tagging Instances for Deployment Groups in AWS CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html). 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagset-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagset-syntax.json"></a>

```
{
  "[Ec2TagSetList](#cfn-codedeploy-deploymentgroup-ec2tagset-ec2tagsetlist)" : [ EC2TagSetListObject, ... ]
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagset-syntax.yaml"></a>

```
  [Ec2TagSetList](#cfn-codedeploy-deploymentgroup-ec2tagset-ec2tagsetlist): 
    - EC2TagSetListObject
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagset-properties"></a>

`Ec2TagSetList`  <a name="cfn-codedeploy-deploymentgroup-ec2tagset-ec2tagsetlist"></a>
 The Amazon EC2 tags that are already applied to Amazon EC2 instances that you want to include in the deployment group. CodeDeploy includes all Amazon EC2 instances identified by any of the tags you specify in this deployment group.   
 Duplicates are not allowed.   
*Required*: No  
*Type*: Array of [EC2TagSetListObject](aws-properties-codedeploy-deploymentgroup-ec2tagsetlistobject.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagset--seealso"></a>
+ [EC2TagSet](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_EC2TagSet.html) in the *AWS CodeDeploy API Reference*.



# AWS::CodeDeploy::DeploymentGroup EC2TagSetListObject
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagsetlistobject"></a>

The `EC2TagSet` property type specifies information about groups of tags applied to Amazon EC2 instances. The deployment group includes only Amazon EC2 instances identified by all the tag groups. Cannot be used in the same template as EC2TagFilters.

For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see [Tagging Instances for Deployment Groups in AWS CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html) in the *AWS CodeDeploy User Guide*.

`EC2TagSet` is a property of the [DeploymentGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html) resource type.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagsetlistobject-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagsetlistobject-syntax.json"></a>

```
{
  "[Ec2TagGroup](#cfn-codedeploy-deploymentgroup-ec2tagsetlistobject-ec2taggroup)" : [ EC2TagFilter, ... ]
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagsetlistobject-syntax.yaml"></a>

```
  [Ec2TagGroup](#cfn-codedeploy-deploymentgroup-ec2tagsetlistobject-ec2taggroup): 
    - EC2TagFilter
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagsetlistobject-properties"></a>

`Ec2TagGroup`  <a name="cfn-codedeploy-deploymentgroup-ec2tagsetlistobject-ec2taggroup"></a>
A list that contains other lists of Amazon EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.  
*Required*: No  
*Type*: Array of [EC2TagFilter](aws-properties-codedeploy-deploymentgroup-ec2tagfilter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-codedeploy-deploymentgroup-ec2tagsetlistobject--seealso"></a>
+ [EC2TagSet](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_EC2TagSet.html) in the *AWS CodeDeploy API Reference*.



# AWS::CodeDeploy::DeploymentGroup ECSService
<a name="aws-properties-codedeploy-deploymentgroup-ecsservice"></a>

 Contains the service and cluster names used to identify an Amazon ECS deployment's target. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-ecsservice-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-ecsservice-syntax.json"></a>

```
{
  "[ClusterName](#cfn-codedeploy-deploymentgroup-ecsservice-clustername)" : String,
  "[ServiceName](#cfn-codedeploy-deploymentgroup-ecsservice-servicename)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-ecsservice-syntax.yaml"></a>

```
  [ClusterName](#cfn-codedeploy-deploymentgroup-ecsservice-clustername): String
  [ServiceName](#cfn-codedeploy-deploymentgroup-ecsservice-servicename): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-ecsservice-properties"></a>

`ClusterName`  <a name="cfn-codedeploy-deploymentgroup-ecsservice-clustername"></a>
 The name of the cluster that the Amazon ECS service is associated with.   
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceName`  <a name="cfn-codedeploy-deploymentgroup-ecsservice-servicename"></a>
 The name of the target Amazon ECS service.   
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup ELBInfo
<a name="aws-properties-codedeploy-deploymentgroup-elbinfo"></a>

The `ELBInfo` property type specifies information about the Elastic Load Balancing load balancer used for an CodeDeploy deployment group.

If you specify the `ELBInfo` property, the `DeploymentStyle.DeploymentOption` property must be set to `WITH_TRAFFIC_CONTROL` for AWS CodeDeploy to route your traffic using the specified load balancers.

`ELBInfo` is a property of the [AWS CodeDeploy DeploymentGroup LoadBalancerInfo ](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-loadbalancerinfo.html) property type. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-elbinfo-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-elbinfo-syntax.json"></a>

```
{
  "[Name](#cfn-codedeploy-deploymentgroup-elbinfo-name)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-elbinfo-syntax.yaml"></a>

```
  [Name](#cfn-codedeploy-deploymentgroup-elbinfo-name): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-elbinfo-properties"></a>

`Name`  <a name="cfn-codedeploy-deploymentgroup-elbinfo-name"></a>
For blue/green deployments, the name of the load balancer that is used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment is complete.  
CloudFormation supports blue/green deployments on AWS Lambda compute platforms only.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup GitHubLocation
<a name="aws-properties-codedeploy-deploymentgroup-githublocation"></a>

`GitHubLocation` is a property of the [CodeDeploy DeploymentGroup Revision](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-deployment-revision.html) property that specifies the location of an application revision that is stored in GitHub. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-githublocation-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-githublocation-syntax.json"></a>

```
{
  "[CommitId](#cfn-codedeploy-deploymentgroup-githublocation-commitid)" : String,
  "[Repository](#cfn-codedeploy-deploymentgroup-githublocation-repository)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-githublocation-syntax.yaml"></a>

```
  [CommitId](#cfn-codedeploy-deploymentgroup-githublocation-commitid): String
  [Repository](#cfn-codedeploy-deploymentgroup-githublocation-repository): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-githublocation-properties"></a>

`CommitId`  <a name="cfn-codedeploy-deploymentgroup-githublocation-commitid"></a>
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Repository`  <a name="cfn-codedeploy-deploymentgroup-githublocation-repository"></a>
The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.   
Specify the value as `account/repository`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup GreenFleetProvisioningOption
<a name="aws-properties-codedeploy-deploymentgroup-greenfleetprovisioningoption"></a>

Information about the instances that belong to the replacement environment in a blue/green deployment.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-greenfleetprovisioningoption-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-greenfleetprovisioningoption-syntax.json"></a>

```
{
  "[Action](#cfn-codedeploy-deploymentgroup-greenfleetprovisioningoption-action)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-greenfleetprovisioningoption-syntax.yaml"></a>

```
  [Action](#cfn-codedeploy-deploymentgroup-greenfleetprovisioningoption-action): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-greenfleetprovisioningoption-properties"></a>

`Action`  <a name="cfn-codedeploy-deploymentgroup-greenfleetprovisioningoption-action"></a>
The method used to add instances to a replacement environment.  
+ `DISCOVER_EXISTING`: Use instances that already exist or will be created manually.
+ `COPY_AUTO_SCALING_GROUP`: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.
*Required*: No  
*Type*: String  
*Allowed values*: `DISCOVER_EXISTING | COPY_AUTO_SCALING_GROUP`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup LoadBalancerInfo
<a name="aws-properties-codedeploy-deploymentgroup-loadbalancerinfo"></a>

The `LoadBalancerInfo` property type specifies information about the load balancer or target group used for an AWS CodeDeploy deployment group. For more information, see [ Integrating CodeDeploy with Elastic Load Balancing](https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-elastic-load-balancing.html) in the *AWS CodeDeploy User Guide*.

For CloudFormation to use the properties specified in `LoadBalancerInfo`, the `DeploymentStyle.DeploymentOption` property must be set to `WITH_TRAFFIC_CONTROL`. If `DeploymentStyle.DeploymentOption` is not set to `WITH_TRAFFIC_CONTROL`, CloudFormation ignores any settings specified in `LoadBalancerInfo`.

**Note**  
CloudFormation supports blue/green deployments on the AWS Lambda compute platform only.

`LoadBalancerInfo` is a property of the [DeploymentGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html) resource. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-loadbalancerinfo-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-loadbalancerinfo-syntax.json"></a>

```
{
  "[ElbInfoList](#cfn-codedeploy-deploymentgroup-loadbalancerinfo-elbinfolist)" : [ ELBInfo, ... ],
  "[TargetGroupInfoList](#cfn-codedeploy-deploymentgroup-loadbalancerinfo-targetgroupinfolist)" : [ TargetGroupInfo, ... ],
  "[TargetGroupPairInfoList](#cfn-codedeploy-deploymentgroup-loadbalancerinfo-targetgrouppairinfolist)" : [ TargetGroupPairInfo, ... ]
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-loadbalancerinfo-syntax.yaml"></a>

```
  [ElbInfoList](#cfn-codedeploy-deploymentgroup-loadbalancerinfo-elbinfolist): 
    - ELBInfo
  [TargetGroupInfoList](#cfn-codedeploy-deploymentgroup-loadbalancerinfo-targetgroupinfolist): 
    - TargetGroupInfo
  [TargetGroupPairInfoList](#cfn-codedeploy-deploymentgroup-loadbalancerinfo-targetgrouppairinfolist): 
    - TargetGroupPairInfo
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-loadbalancerinfo-properties"></a>

`ElbInfoList`  <a name="cfn-codedeploy-deploymentgroup-loadbalancerinfo-elbinfolist"></a>
An array that contains information about the load balancers to use for load balancing in a deployment. If you're using Classic Load Balancers, specify those load balancers in this array.   
You can add up to 10 load balancers to the array.
If you're using Application Load Balancers or Network Load Balancers, use the `targetGroupInfoList` array instead of this one.
*Required*: No  
*Type*: Array of [ELBInfo](aws-properties-codedeploy-deploymentgroup-elbinfo.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetGroupInfoList`  <a name="cfn-codedeploy-deploymentgroup-loadbalancerinfo-targetgroupinfolist"></a>
An array that contains information about the target groups to use for load balancing in a deployment. If you're using Application Load Balancers and Network Load Balancers, specify their associated target groups in this array.  
You can add up to 10 target groups to the array.
If you're using Classic Load Balancers, use the `elbInfoList` array instead of this one.
*Required*: Conditional  
*Type*: Array of [TargetGroupInfo](aws-properties-codedeploy-deploymentgroup-targetgroupinfo.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetGroupPairInfoList`  <a name="cfn-codedeploy-deploymentgroup-loadbalancerinfo-targetgrouppairinfolist"></a>
 The target group pair information. This is an array of `TargeGroupPairInfo` objects with a maximum size of one.   
*Required*: No  
*Type*: Array of [TargetGroupPairInfo](aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup OnPremisesTagSet
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagset"></a>

The `OnPremisesTagSet` property type specifies a list containing other lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.

For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see [Tagging Instances for Deployment Groups in AWS CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html) in the *AWS CodeDeploy User Guide*.

`OnPremisesTagSet` is a property of the [DeploymentGroup ](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html) resource.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagset-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagset-syntax.json"></a>

```
{
  "[OnPremisesTagSetList](#cfn-codedeploy-deploymentgroup-onpremisestagset-onpremisestagsetlist)" : [ OnPremisesTagSetListObject, ... ]
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagset-syntax.yaml"></a>

```
  [OnPremisesTagSetList](#cfn-codedeploy-deploymentgroup-onpremisestagset-onpremisestagsetlist): 
    - OnPremisesTagSetListObject
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagset-properties"></a>

`OnPremisesTagSetList`  <a name="cfn-codedeploy-deploymentgroup-onpremisestagset-onpremisestagsetlist"></a>
A list that contains other lists of on-premises instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.  
Duplicates are not allowed.   
*Required*: No  
*Type*: Array of [OnPremisesTagSetListObject](aws-properties-codedeploy-deploymentgroup-onpremisestagsetlistobject.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup OnPremisesTagSetListObject
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagsetlistobject"></a>

 The `OnPremisesTagSetListObject` property type specifies lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list. 

`OnPremisesTagSetListObject` is a property of the [CodeDeploy DeploymentGroup OnPremisesTagSet](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-onpremisestagset.html) property type. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagsetlistobject-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagsetlistobject-syntax.json"></a>

```
{
  "[OnPremisesTagGroup](#cfn-codedeploy-deploymentgroup-onpremisestagsetlistobject-onpremisestaggroup)" : [ TagFilter, ... ]
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagsetlistobject-syntax.yaml"></a>

```
  [OnPremisesTagGroup](#cfn-codedeploy-deploymentgroup-onpremisestagsetlistobject-onpremisestaggroup): 
    - TagFilter
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-onpremisestagsetlistobject-properties"></a>

`OnPremisesTagGroup`  <a name="cfn-codedeploy-deploymentgroup-onpremisestagsetlistobject-onpremisestaggroup"></a>
Information about groups of on-premises instance tags.  
*Required*: No  
*Type*: Array of [TagFilter](aws-properties-codedeploy-deploymentgroup-tagfilter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup RevisionLocation
<a name="aws-properties-codedeploy-deploymentgroup-revisionlocation"></a>

`RevisionLocation` is a property that defines the location of the CodeDeploy application revision to deploy. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-revisionlocation-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-revisionlocation-syntax.json"></a>

```
{
  "[GitHubLocation](#cfn-codedeploy-deploymentgroup-revisionlocation-githublocation)" : GitHubLocation,
  "[RevisionType](#cfn-codedeploy-deploymentgroup-revisionlocation-revisiontype)" : String,
  "[S3Location](#cfn-codedeploy-deploymentgroup-revisionlocation-s3location)" : S3Location
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-revisionlocation-syntax.yaml"></a>

```
  [GitHubLocation](#cfn-codedeploy-deploymentgroup-revisionlocation-githublocation): 
    GitHubLocation
  [RevisionType](#cfn-codedeploy-deploymentgroup-revisionlocation-revisiontype): String
  [S3Location](#cfn-codedeploy-deploymentgroup-revisionlocation-s3location): 
    S3Location
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-revisionlocation-properties"></a>

`GitHubLocation`  <a name="cfn-codedeploy-deploymentgroup-revisionlocation-githublocation"></a>
Information about the location of application artifacts stored in GitHub.  
*Required*: No  
*Type*: [GitHubLocation](aws-properties-codedeploy-deploymentgroup-githublocation.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RevisionType`  <a name="cfn-codedeploy-deploymentgroup-revisionlocation-revisiontype"></a>
The type of application revision:  
+ S3: An application revision stored in Amazon S3.
+ GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
+ String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments only).
+ AppSpecContent: An `AppSpecContent` object that contains the contents of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
*Required*: No  
*Type*: String  
*Allowed values*: `S3 | GitHub | String | AppSpecContent | SystemsManagerPatchBaseline`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3Location`  <a name="cfn-codedeploy-deploymentgroup-revisionlocation-s3location"></a>
Information about the location of a revision stored in Amazon S3.   
*Required*: No  
*Type*: [S3Location](aws-properties-codedeploy-deploymentgroup-s3location.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup S3Location
<a name="aws-properties-codedeploy-deploymentgroup-s3location"></a>

`S3Location` is a property of the [CodeDeploy DeploymentGroup Revision ](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-deployment-revision.html) property that specifies the location of an application revision that is stored in Amazon Simple Storage Service (Amazon S3). 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-s3location-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-s3location-syntax.json"></a>

```
{
  "[Bucket](#cfn-codedeploy-deploymentgroup-s3location-bucket)" : String,
  "[BundleType](#cfn-codedeploy-deploymentgroup-s3location-bundletype)" : String,
  "[ETag](#cfn-codedeploy-deploymentgroup-s3location-etag)" : String,
  "[Key](#cfn-codedeploy-deploymentgroup-s3location-key)" : String,
  "[Version](#cfn-codedeploy-deploymentgroup-s3location-version)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-s3location-syntax.yaml"></a>

```
  [Bucket](#cfn-codedeploy-deploymentgroup-s3location-bucket): String
  [BundleType](#cfn-codedeploy-deploymentgroup-s3location-bundletype): String
  [ETag](#cfn-codedeploy-deploymentgroup-s3location-etag): String
  [Key](#cfn-codedeploy-deploymentgroup-s3location-key): String
  [Version](#cfn-codedeploy-deploymentgroup-s3location-version): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-s3location-properties"></a>

`Bucket`  <a name="cfn-codedeploy-deploymentgroup-s3location-bucket"></a>
The name of the Amazon S3 bucket where the application revision is stored.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BundleType`  <a name="cfn-codedeploy-deploymentgroup-s3location-bundletype"></a>
The file type of the application revision. Must be one of the following:  
+ JSON
+ tar: A tar archive file.
+ tgz: A compressed tar archive file.
+ YAML
+ zip: A zip archive file.
*Required*: No  
*Type*: String  
*Allowed values*: `tar | tgz | zip | YAML | JSON`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ETag`  <a name="cfn-codedeploy-deploymentgroup-s3location-etag"></a>
The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.  
If the ETag is not specified as an input parameter, ETag validation of the object is skipped.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Key`  <a name="cfn-codedeploy-deploymentgroup-s3location-key"></a>
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Version`  <a name="cfn-codedeploy-deploymentgroup-s3location-version"></a>
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.  
If the version is not specified, the system uses the most recent version by default.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup Tag
<a name="aws-properties-codedeploy-deploymentgroup-tag"></a>

Information about a tag.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-tag-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-codedeploy-deploymentgroup-tag-key)" : String,
  "[Value](#cfn-codedeploy-deploymentgroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-codedeploy-deploymentgroup-tag-key): String
  [Value](#cfn-codedeploy-deploymentgroup-tag-value): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-tag-properties"></a>

`Key`  <a name="cfn-codedeploy-deploymentgroup-tag-key"></a>
The tag's key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-codedeploy-deploymentgroup-tag-value"></a>
The tag's value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup TagFilter
<a name="aws-properties-codedeploy-deploymentgroup-tagfilter"></a>

`TagFilter` is a property type of the [AWS::CodeDeploy::DeploymentGroup ](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html) resource that specifies which on-premises instances to associate with the deployment group. To register on-premise instances with AWS CodeDeploy, see [Configure Existing On-Premises Instances by Using AWS CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-on-premises.html) in the *AWS CodeDeploy User Guide*.

For more information about using tags and tag groups to help manage your Amazon EC2 instances and on-premises instances, see [Tagging Instances for Deployment Groups in AWS CodeDeploy](https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html) in the *AWS CodeDeploy User Guide*.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-tagfilter-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-tagfilter-syntax.json"></a>

```
{
  "[Key](#cfn-codedeploy-deploymentgroup-tagfilter-key)" : String,
  "[Type](#cfn-codedeploy-deploymentgroup-tagfilter-type)" : String,
  "[Value](#cfn-codedeploy-deploymentgroup-tagfilter-value)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-tagfilter-syntax.yaml"></a>

```
  [Key](#cfn-codedeploy-deploymentgroup-tagfilter-key): String
  [Type](#cfn-codedeploy-deploymentgroup-tagfilter-type): String
  [Value](#cfn-codedeploy-deploymentgroup-tagfilter-value): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-tagfilter-properties"></a>

`Key`  <a name="cfn-codedeploy-deploymentgroup-tagfilter-key"></a>
The on-premises instance tag filter key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-codedeploy-deploymentgroup-tagfilter-type"></a>
The on-premises instance tag filter type:  
+ KEY\$1ONLY: Key only.
+ VALUE\$1ONLY: Value only.
+ KEY\$1AND\$1VALUE: Key and value.
*Required*: No  
*Type*: String  
*Allowed values*: `KEY_ONLY | VALUE_ONLY | KEY_AND_VALUE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-codedeploy-deploymentgroup-tagfilter-value"></a>
The on-premises instance tag filter value.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup TargetGroupInfo
<a name="aws-properties-codedeploy-deploymentgroup-targetgroupinfo"></a>

The `TargetGroupInfo` property type specifies information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group. For more information, see [ TargetGroupInfo](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_TargetGroupInfo.html) in the *AWS CodeDeploy API Reference*

If you specify the `TargetGroupInfo` property, the `DeploymentStyle.DeploymentOption` property must be set to `WITH_TRAFFIC_CONTROL` for CodeDeploy to route your traffic using the specified target groups.

`TargetGroupInfo` is a property of the [LoadBalancerInfo](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-loadbalancerinfo.html) property type. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-targetgroupinfo-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-targetgroupinfo-syntax.json"></a>

```
{
  "[Name](#cfn-codedeploy-deploymentgroup-targetgroupinfo-name)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-targetgroupinfo-syntax.yaml"></a>

```
  [Name](#cfn-codedeploy-deploymentgroup-targetgroupinfo-name): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-targetgroupinfo-properties"></a>

`Name`  <a name="cfn-codedeploy-deploymentgroup-targetgroupinfo-name"></a>
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes. No duplicates allowed.  
CloudFormation supports blue/green deployments on AWS Lambda compute platforms only.
This value cannot exceed 32 characters, so you should use the `Name` property of the target group, or the `TargetGroupName` attribute with the `Fn::GetAtt` intrinsic function, as shown in the following example. Don't use the group's Amazon Resource Name (ARN) or `TargetGroupFullName` attribute.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup TargetGroupPairInfo
<a name="aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo"></a>

 Information about two target groups and how traffic is routed during an Amazon ECS deployment. An optional test traffic route can be specified. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo-syntax.json"></a>

```
{
  "[ProdTrafficRoute](#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-prodtrafficroute)" : TrafficRoute,
  "[TargetGroups](#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-targetgroups)" : [ TargetGroupInfo, ... ],
  "[TestTrafficRoute](#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-testtrafficroute)" : TrafficRoute
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo-syntax.yaml"></a>

```
  [ProdTrafficRoute](#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-prodtrafficroute): 
    TrafficRoute
  [TargetGroups](#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-targetgroups): 
    - TargetGroupInfo
  [TestTrafficRoute](#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-testtrafficroute): 
    TrafficRoute
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo-properties"></a>

`ProdTrafficRoute`  <a name="cfn-codedeploy-deploymentgroup-targetgrouppairinfo-prodtrafficroute"></a>
 The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.   
*Required*: No  
*Type*: [TrafficRoute](aws-properties-codedeploy-deploymentgroup-trafficroute.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetGroups`  <a name="cfn-codedeploy-deploymentgroup-targetgrouppairinfo-targetgroups"></a>
 One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.   
*Required*: No  
*Type*: Array of [TargetGroupInfo](aws-properties-codedeploy-deploymentgroup-targetgroupinfo.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TestTrafficRoute`  <a name="cfn-codedeploy-deploymentgroup-targetgrouppairinfo-testtrafficroute"></a>
 An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.   
*Required*: No  
*Type*: [TrafficRoute](aws-properties-codedeploy-deploymentgroup-trafficroute.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup TrafficRoute
<a name="aws-properties-codedeploy-deploymentgroup-trafficroute"></a>

 Information about a listener. The listener contains the path used to route traffic that is received from the load balancer to a target group. 

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-trafficroute-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-trafficroute-syntax.json"></a>

```
{
  "[ListenerArns](#cfn-codedeploy-deploymentgroup-trafficroute-listenerarns)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-trafficroute-syntax.yaml"></a>

```
  [ListenerArns](#cfn-codedeploy-deploymentgroup-trafficroute-listenerarns): 
    - String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-trafficroute-properties"></a>

`ListenerArns`  <a name="cfn-codedeploy-deploymentgroup-trafficroute-listenerarns"></a>
 The Amazon Resource Name (ARN) of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.   
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::CodeDeploy::DeploymentGroup TriggerConfig
<a name="aws-properties-codedeploy-deploymentgroup-triggerconfig"></a>

Information about notification triggers for the deployment group.

## Syntax
<a name="aws-properties-codedeploy-deploymentgroup-triggerconfig-syntax"></a>

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

### JSON
<a name="aws-properties-codedeploy-deploymentgroup-triggerconfig-syntax.json"></a>

```
{
  "[TriggerEvents](#cfn-codedeploy-deploymentgroup-triggerconfig-triggerevents)" : [ String, ... ],
  "[TriggerName](#cfn-codedeploy-deploymentgroup-triggerconfig-triggername)" : String,
  "[TriggerTargetArn](#cfn-codedeploy-deploymentgroup-triggerconfig-triggertargetarn)" : String
}
```

### YAML
<a name="aws-properties-codedeploy-deploymentgroup-triggerconfig-syntax.yaml"></a>

```
  [TriggerEvents](#cfn-codedeploy-deploymentgroup-triggerconfig-triggerevents): 
    - String
  [TriggerName](#cfn-codedeploy-deploymentgroup-triggerconfig-triggername): String
  [TriggerTargetArn](#cfn-codedeploy-deploymentgroup-triggerconfig-triggertargetarn): String
```

## Properties
<a name="aws-properties-codedeploy-deploymentgroup-triggerconfig-properties"></a>

`TriggerEvents`  <a name="cfn-codedeploy-deploymentgroup-triggerconfig-triggerevents"></a>
 The event type or types that trigger notifications.   
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TriggerName`  <a name="cfn-codedeploy-deploymentgroup-triggerconfig-triggername"></a>
The name of the notification trigger.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TriggerTargetArn`  <a name="cfn-codedeploy-deploymentgroup-triggerconfig-triggertargetarn"></a>
The Amazon Resource Name (ARN) of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)