AWS::CodeDeploy::DeploymentGroupThe `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* . > 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.
import { CfnDeploymentGroup } from 'aws-cdk-lib/aws-codedeploy';Or use the module namespace:
import * as codedeploy from 'aws-cdk-lib/aws-codedeploy';
// codedeploy.CfnDeploymentGroupConfiguration passed to the constructor as CfnDeploymentGroupProps.
applicationNameRequiredstringThe name of an existing CodeDeploy application to associate this deployment group with.
serviceRoleArnRequiredstringA 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) .
alarmConfigurationOptionalIResolvable | AlarmConfigurationPropertyInformation about the Amazon CloudWatch alarms that are associated with the deployment group.
autoRollbackConfigurationOptionalIResolvable | AutoRollbackConfigurationPropertyInformation about the automatic rollback configuration that is associated with the deployment group. If you specify this property, don't specify the `Deployment` property.
autoScalingGroupsOptionalstring[]A list of associated Auto Scaling groups that CodeDeploy automatically deploys revisions to when new instances are created. Duplicates are not allowed.
blueGreenDeploymentConfigurationOptionalIResolvable | BlueGreenDeploymentConfigurationPropertyInformation about blue/green deployment options for a deployment group.
deploymentOptionalIResolvable | DeploymentPropertyThe 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.
deploymentConfigNameOptionalstringA 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* .
deploymentGroupNameOptionalstringA 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.
deploymentStyleOptionalIResolvable | DeploymentStylePropertyAttributes 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.
ec2TagFiltersOptionalIResolvable | IResolvable | EC2TagFilterProperty[]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.
ec2TagSetOptionalIResolvable | EC2TagSetPropertyInformation 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` .
ecsServicesOptionalIResolvable | IResolvable | ECSServiceProperty[]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>` .
loadBalancerInfoOptionalIResolvable | LoadBalancerInfoPropertyInformation 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* .
onPremisesInstanceTagFiltersOptionalIResolvable | IResolvable | TagFilterProperty[]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.
onPremisesTagSetOptionalIResolvable | OnPremisesTagSetPropertyInformation 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.
outdatedInstancesStrategyOptionalstringIndicates 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.
tagsOptionalCfnTag[]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.
terminationHookEnabledOptionalboolean | IResolvableIndicates 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* .
triggerConfigurationsOptionalIResolvable | IResolvable | TriggerConfigProperty[]Information about triggers associated with the deployment group. Duplicates are not allowed
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-codedeployAWS::CodeDeploy::DeploymentGroup