Skip to content

Commit 74aba8f

Browse files
authored
docs(aws-codedeploy): add reference to new ECS CodeDeploy construct (#23478)
Add reference to new ECS CodeDeploy construct Construct Hub ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Construct Runtime Dependencies: * [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent f03cc85 commit 74aba8f

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

packages/@aws-cdk/aws-codedeploy/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- [ECS Applications](#ecs-applications)
2727
- [ECS Deployment Groups](#ecs-deployment-groups)
2828
- [ECS Deployment Configurations](#ecs-deployment-configurations)
29+
- [ECS Deployments](#ecs-deployments)
2930

3031
## Introduction
3132

@@ -663,3 +664,55 @@ const deploymentConfig = codedeploy.EcsDeploymentConfig.fromEcsDeploymentConfigN
663664
'MyExistingDeploymentConfiguration',
664665
);
665666
```
667+
668+
## ECS Deployments
669+
670+
[![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg)](https://constructs.dev/packages/@cdklabs/cdk-ecs-codedeploy)
671+
672+
An experimental construct is available on the Construct Hub called [@cdklabs/cdk-ecs-codedeploy](https://constructs.dev/packages/@cdklabs/cdk-ecs-codedeploy) that manages ECS CodeDeploy deployments.
673+
674+
```ts
675+
declare const deploymentGroup: codeDeploy.IEcsDeploymentGroup;
676+
declare const taskDefinition: ecs.ITaskDefinition;
677+
678+
new EcsDeployment({
679+
deploymentGroup,
680+
targetService: {
681+
taskDefinition,
682+
containerName: 'mycontainer',
683+
containerPort: 80,
684+
},
685+
});
686+
```
687+
688+
The deployment will use the AutoRollbackConfig for the EcsDeploymentGroup unless it is overridden in the deployment:
689+
690+
```ts
691+
new EcsDeployment({
692+
deploymentGroup,
693+
targetService: {
694+
taskDefinition,
695+
containerName: 'mycontainer',
696+
containerPort: 80,
697+
},
698+
autoRollback: {
699+
failedDeployment: true,
700+
deploymentInAlarm: true,
701+
stoppedDeployment: false,
702+
},
703+
});
704+
```
705+
706+
By default, the CodeDeploy Deployment will timeout after 30 minutes. The timeout value can be overridden:
707+
708+
```ts
709+
new EcsDeployment({
710+
deploymentGroup,
711+
targetService: {
712+
taskDefinition,
713+
containerName: 'mycontainer',
714+
containerPort: 80,
715+
},
716+
timeout: Duration.minutes(60),
717+
});
718+
```

0 commit comments

Comments
 (0)