# EcsDeploymentGroupProps

Construction properties for `EcsDeploymentGroup`.

Extends: EcsDeploymentGroupProps
Used as props by: EcsDeploymentGroup

- Source: [`aws-codedeploy/lib/ecs/deployment-group.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codedeploy/lib/ecs/deployment-group.ts#L128)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
declare const myApplication: codedeploy.EcsApplication;
declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.FargateTaskDefinition;
declare const blueTargetGroup: elbv2.ITargetGroup;
declare const greenTargetGroup: elbv2.ITargetGroup;
declare const listener: elbv2.IApplicationListener;

const service = new ecs.FargateService(this, 'Service', {
  cluster,
  taskDefinition,
  deploymentController: {
    type: ecs.DeploymentControllerType.CODE_DEPLOY,
  },
});

new codedeploy.EcsDeploymentGroup(this, 'BlueGreenDG', {
  service,
  blueGreenDeploymentConfig: {
    blueTargetGroup,
    greenTargetGroup,
    listener,
  },
  deploymentConfig: codedeploy.EcsDeploymentConfig.CANARY_10PERCENT_5MINUTES,
});
```

## Properties

- `alarms`: [IAlarmRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cloudwatch.IAlarmRef.html)[] = [] — The CloudWatch alarms associated with this Deployment Group.

  CodeDeploy will stop (and optionally roll back)
  a deployment if during it any of the alarms trigger.

  Alarms can also be added after the Deployment Group is created using the `#addAlarm` method.

- `application`: [IApplicationRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_codedeploy.IApplicationRef.html) — The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.

  **Default:** One will be created for you.

- `autoRollback`: [AutoRollbackConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_codedeploy.AutoRollbackConfig.html) — The auto-rollback configuration for this Deployment Group.

  **Default:** default AutoRollbackConfig.

- `blueGreenDeploymentConfig`: [EcsBlueGreenDeploymentConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_codedeploy.EcsBlueGreenDeploymentConfig.html) (required) — The configuration options for blue-green ECS deployments.

- `deploymentConfig`: [IDeploymentConfigRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_codedeploy.IDeploymentConfigRef.html) = EcsDeploymentConfig.ALL_AT_ONCE — The Deployment Configuration this Deployment Group uses.

- `deploymentGroupName`: string — The physical, human-readable name of the CodeDeploy Deployment Group.

  **Default:** An auto-generated name will be used.

- `ignoreAlarmConfiguration`: boolean = false — Whether to skip the step of checking CloudWatch alarms during the deployment process.

- `ignorePollAlarmsFailure`: boolean = false — Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The service Role of this Deployment Group.

  **Default:** A new Role will be created.

- `service`: [IBaseService](/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.IBaseService.html) (required) — The ECS service to deploy with this Deployment Group.
