Skip to content

Commit 9a4dac6

Browse files
authored
Merge branch 'main' into chore-ec2-windows-versions
2 parents f3092e6 + cc7e95b commit 9a4dac6

File tree

418 files changed

+31349
-8470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

418 files changed

+31349
-8470
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Weekly repo metrics
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 9 * * MON'
6+
7+
permissions:
8+
issues: write
9+
pull-requests: read
10+
11+
jobs:
12+
build:
13+
# this workflow will always fail in forks; bail if this isn't running in the upstream
14+
if: github.repository == 'aws/aws-cdk'
15+
name: metrics
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Get dates for last week
20+
shell: bash
21+
run: |
22+
# Calculate the date of the previous Monday
23+
PREVIOUS_MONDAY=$(date -d "7 days ago" "+%Y-%m-%d")
24+
25+
# Calculate the date of the current Sunday
26+
CURRENT_SUNDAY=$(date -d "1 day ago" "+%Y-%m-%d")
27+
28+
# Set an environment variable with the date range
29+
echo "$PREVIOUS_MONDAY..$CURRENT_SUNDAY"
30+
echo "last_week=$PREVIOUS_MONDAY..$CURRENT_SUNDAY" >> "$GITHUB_ENV"
31+
32+
- name: Report on issues
33+
uses: github/issue-metrics@v2
34+
env:
35+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
SEARCH_QUERY: 'repo:aws/aws-cdk is:issue created:${{ env.last_week }} -reason:"not planned"'
37+
38+
- name: Create report for issues
39+
uses: peter-evans/create-issue-from-file@v5
40+
with:
41+
title: Weekly issue metrics report
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
content-filepath: ./issue_metrics.md
44+
assignees: paulhcsun
45+
46+
- name: Report on PRs
47+
uses: github/issue-metrics@v2
48+
env:
49+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
SEARCH_QUERY: 'repo:aws/aws-cdk is:pr created:${{ env.last_week }} -is:draft'
51+
52+
- name: Create report for PRs
53+
uses: peter-evans/create-issue-from-file@v5
54+
with:
55+
title: Weekly PR metrics report
56+
token: ${{ secrets.GITHUB_TOKEN }}
57+
content-filepath: ./issue_metrics.md
58+
assignees: paulhcsun

.github/workflows/request-cli-integ-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
persist-credentials: false
2020
- name: Find changed cli files
2121
id: changed-cli-files
22-
uses: tj-actions/changed-files@800a2825992141ddde1a8bca8ad394cec34d3188
22+
uses: tj-actions/changed-files@20576b4b9ed46d41e2d45a2256e5e2316dde6834
2323
with:
2424
base_sha: ${{ github.event.pull_request.base.sha }}
2525
files_yaml: |

CHANGELOG.v2.alpha.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.134.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.133.0-alpha.0...v2.134.0-alpha.0) (2024-03-26)
6+
7+
8+
### Features
9+
10+
* **kinesisanalytics-flink:** add support for Flink 1.18 ([#29554](https://github.com/aws/aws-cdk/issues/29554)) ([8fd8ee8](https://github.com/aws/aws-cdk/commit/8fd8ee8e7e5a6e047e5110f084dff61906bde160)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisanalyticsv2-application.html#aws-resource-kinesisanalyticsv2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisanalyticsv2-application.html/issues/aws-resource-kinesisanalyticsv2)
11+
12+
13+
### Bug Fixes
14+
15+
* **glue:** s3 path specified in --spark-event-logs-path needs to end with slash ([#29357](https://github.com/aws/aws-cdk/issues/29357)) ([4ff3565](https://github.com/aws/aws-cdk/commit/4ff3565a9d7b0298bf884822fecabdd3cff643aa)), closes [#29356](https://github.com/aws/aws-cdk/issues/29356)
16+
17+
## [2.133.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.132.1-alpha.0...v2.133.0-alpha.0) (2024-03-14)
18+
19+
## [2.132.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.132.0-alpha.0...v2.132.1-alpha.0) (2024-03-12)
20+
521
## [2.132.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.131.0-alpha.0...v2.132.0-alpha.0) (2024-03-08)
622

723

CHANGELOG.v2.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,76 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.134.0](https://github.com/aws/aws-cdk/compare/v2.133.0...v2.134.0) (2024-03-26)
6+
7+
8+
### Features
9+
10+
* update L1 CloudFormation resource definitions ([#29605](https://github.com/aws/aws-cdk/issues/29605)) ([bf34b6c](https://github.com/aws/aws-cdk/commit/bf34b6cea31c452da2f1eda49072331466994af2))
11+
* update L1 CloudFormation resource definitions ([#29606](https://github.com/aws/aws-cdk/issues/29606)) ([432f97d](https://github.com/aws/aws-cdk/commit/432f97d9de3522e198b5bd7832bce6e26cf18d1f))
12+
* **apigatewayv2:** add missing `WebSocketIntegration` props ([#29566](https://github.com/aws/aws-cdk/issues/29566)) ([7534dcd](https://github.com/aws/aws-cdk/commit/7534dcd761ac9dc302022d5ef612f4a942a56c4c)), closes [#29562](https://github.com/aws/aws-cdk/issues/29562)
13+
* **appsync:** queryDepthLimit and resolverCountLimit props on GraphqlApi ([#29182](https://github.com/aws/aws-cdk/issues/29182)) ([ba6d0b3](https://github.com/aws/aws-cdk/commit/ba6d0b3ec3fba2ac5a704022bcbe6a3ba6f7dff3))
14+
* **cli:** warn of non-existent stacks in `cdk destroy` ([#27921](https://github.com/aws/aws-cdk/issues/27921)) ([f0d1d67](https://github.com/aws/aws-cdk/commit/f0d1d675c7ca6575f953a446a86185cc20122a91)), closes [#27179](https://github.com/aws/aws-cdk/issues/27179)
15+
* **codepipeline-actions:** show status reason in the pipeline for failed change set executions ([#29534](https://github.com/aws/aws-cdk/issues/29534)) ([6d16337](https://github.com/aws/aws-cdk/commit/6d16337c9faed12716697a3b3af2a2be259b21b0))
16+
* **eks:** trainium instance types ([#29155](https://github.com/aws/aws-cdk/issues/29155)) ([507b709](https://github.com/aws/aws-cdk/commit/507b709bab8679750f1e9cbe25794daf2eb76f00)), closes [#29131](https://github.com/aws/aws-cdk/issues/29131)
17+
* **elasticloadbalancingv2:** `denyAllIgwTraffic` and `clientRoutingPolicy` for NLB ([#29521](https://github.com/aws/aws-cdk/issues/29521)) ([7fe8ad3](https://github.com/aws/aws-cdk/commit/7fe8ad3741fa5342ba93652ed9eabd1157682faa)), closes [#29520](https://github.com/aws/aws-cdk/issues/29520)
18+
* **elasticloadbalancingv2:** client keepalive for ALB ([#29504](https://github.com/aws/aws-cdk/issues/29504)) ([9b79f94](https://github.com/aws/aws-cdk/commit/9b79f94da2249c199eb26949c40fa4807de55a77)), closes [#29503](https://github.com/aws/aws-cdk/issues/29503)
19+
* **elasticloadbalancingv2:** enforce security group inbound rules prop ([#29522](https://github.com/aws/aws-cdk/issues/29522)) ([8df2823](https://github.com/aws/aws-cdk/commit/8df2823037553d3f4c1ce28720a883c05b68ee85)), closes [#29516](https://github.com/aws/aws-cdk/issues/29516)
20+
* update L1 CloudFormation resource definitions ([#29530](https://github.com/aws/aws-cdk/issues/29530)) ([1fdac0c](https://github.com/aws/aws-cdk/commit/1fdac0cbb71a84efd3f744ade6a4f49a452968e0))
21+
* update L1 CloudFormation resource definitions ([#29569](https://github.com/aws/aws-cdk/issues/29569)) ([c9fb4f7](https://github.com/aws/aws-cdk/commit/c9fb4f739f3aacf669cdd38b8431695811be5e92))
22+
* update L1 CloudFormation resource definitions ([#29573](https://github.com/aws/aws-cdk/issues/29573)) ([53d2094](https://github.com/aws/aws-cdk/commit/53d2094ada55373736fe646026d2f508c8206df0))
23+
* **rds:** eliminating the need for explicit `secret.grantRead()` invokes when using DataAPI with Aurora cluster ([#29399](https://github.com/aws/aws-cdk/issues/29399)) ([bc9d0b4](https://github.com/aws/aws-cdk/commit/bc9d0b44ef0717c6bd98fd37ab7883d830094461)), closes [#29362](https://github.com/aws/aws-cdk/issues/29362) [/github.com/aws/aws-cdk/pull/29338#discussion_r1512026791](https://github.com/aws//github.com/aws/aws-cdk/pull/29338/issues/discussion_r1512026791)
24+
25+
26+
### Bug Fixes
27+
28+
* **CLI:** `cdk diff` stack deletion causes a race condition ([#29492](https://github.com/aws/aws-cdk/issues/29492)) ([067539a](https://github.com/aws/aws-cdk/commit/067539a9587794ca65b984d0001efa8d274766ca)), closes [#29265](https://github.com/aws/aws-cdk/issues/29265)
29+
* **cloudformation-diff:** move aws-sdk to dependency for cfn-diff to get CFN types resolved in exports ([#28768](https://github.com/aws/aws-cdk/issues/28768)) ([28c4be3](https://github.com/aws/aws-cdk/commit/28c4be3419e8c18ac84f2b72ae1838f8f424c1c6)), closes [#28680](https://github.com/aws/aws-cdk/issues/28680) [#28679](https://github.com/aws/aws-cdk/issues/28679)
30+
* **cloudwatch:** cloudwatch ec2 alarm action with multiple dimension results in error ([#29364](https://github.com/aws/aws-cdk/issues/29364)) ([cc37778](https://github.com/aws/aws-cdk/commit/cc377785c00a021c9b519bdda945be8e99cb1148))
31+
* **cloudwatch:** unrecognized statistic warning when using percentileRank statistic in Stats helper ([#29498](https://github.com/aws/aws-cdk/issues/29498)) ([f2ad980](https://github.com/aws/aws-cdk/commit/f2ad98027a896228c554985e746107a4c7089f70)), closes [#29465](https://github.com/aws/aws-cdk/issues/29465)
32+
* **ecs-patterns:** integ test unable to create ECS service ([#29490](https://github.com/aws/aws-cdk/issues/29490)) ([6faa60e](https://github.com/aws/aws-cdk/commit/6faa60e6a91e86e8d426b82e480b0c5e684a1c84)), closes [/github.com/aws/aws-cdk/pull/29186#issuecomment-1959231406](https://github.com/aws//github.com/aws/aws-cdk/pull/29186/issues/issuecomment-1959231406)
33+
* **elasticloadbalancingv2:** allow alb slow start duration of 0 seconds ([#29445](https://github.com/aws/aws-cdk/issues/29445)) ([cf2351b](https://github.com/aws/aws-cdk/commit/cf2351bfba986352ba6cbc93e00cb4eb9348265a)), closes [#29437](https://github.com/aws/aws-cdk/issues/29437)
34+
* **kms:** kms key grant methods misidentify region when enclosing stack is different region ([#29315](https://github.com/aws/aws-cdk/issues/29315)) ([9076d6e](https://github.com/aws/aws-cdk/commit/9076d6e522002357da307bc09417a5b12bcfb35e))
35+
* **opensearch:** cannot disable cluster logging ([#29205](https://github.com/aws/aws-cdk/issues/29205)) ([c7fcaf7](https://github.com/aws/aws-cdk/commit/c7fcaf7f8d819fa91b93effe2ad55658e980655b)), closes [#29294](https://github.com/aws/aws-cdk/issues/29294)
36+
37+
38+
### Reverts
39+
40+
* "feat(cli): warn of non-existent stacks in `cdk destroy`" ([#29577](https://github.com/aws/aws-cdk/issues/29577)) ([f60e6e9](https://github.com/aws/aws-cdk/commit/f60e6e9b6f761aa170113399bb288311a142142b)), closes [aws/aws-cdk#27921](https://github.com/aws/aws-cdk/issues/27921) [40aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts#L190](https://github.com/40aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts/issues/L190) [/github.com/aws/aws-cdk/blob/07ce8ecc42782475d099b89944571375341c28d3/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts#L86](https://github.com/aws//github.com/aws/aws-cdk/blob/07ce8ecc42782475d099b89944571375341c28d3/packages/aws-cdk/lib/api/cxapp/cloud-executable.ts/issues/L86)
41+
42+
## [2.133.0](https://github.com/aws/aws-cdk/compare/v2.132.1...v2.133.0) (2024-03-14)
43+
44+
45+
### Features
46+
47+
* **CLI:** improved nested stack diff ([#29172](https://github.com/aws/aws-cdk/issues/29172)) ([135b520](https://github.com/aws/aws-cdk/commit/135b5208dce849f49b6f540f7199ece057a7ef22))
48+
* **codepipeline:** change default pipeline type to V2 (under feature flag) ([#29096](https://github.com/aws/aws-cdk/issues/29096)) ([e85231c](https://github.com/aws/aws-cdk/commit/e85231c092892879479cf12b89756e8f2b70a094)), closes [/github.com/aws/aws-cdk/pull/28538#discussion_r1471761574](https://github.com/aws//github.com/aws/aws-cdk/pull/28538/issues/discussion_r1471761574) [/github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts#L492](https://github.com/aws//github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts/issues/L492)
49+
* **ec2:** add APPCONFIG and APPCONFIGDATA to InterfaceVpcEndpointAwsService ([#29408](https://github.com/aws/aws-cdk/issues/29408)) ([baaa50c](https://github.com/aws/aws-cdk/commit/baaa50c73ae3a88d606b62349736ef1180dcf1ad))
50+
* **ecs-patterns:** support `securityGroups` in `NetworkLoadBalancedFargateService` ([#29431](https://github.com/aws/aws-cdk/issues/29431)) ([00e8a7b](https://github.com/aws/aws-cdk/commit/00e8a7b877a732b4236227f6462bf3914ce7a214)), closes [#29430](https://github.com/aws/aws-cdk/issues/29430) [/github.com/aws/aws-cdk/pull/29186#issuecomment-1959231406](https://github.com/aws//github.com/aws/aws-cdk/pull/29186/issues/issuecomment-1959231406)
51+
* **opensearchservice:** cold storage option ([#29387](https://github.com/aws/aws-cdk/issues/29387)) ([ce52c7e](https://github.com/aws/aws-cdk/commit/ce52c7e1ac939dc2f9f08cb29fad0f2dc9714445)), closes [#29366](https://github.com/aws/aws-cdk/issues/29366)
52+
* **rds:** proxy for mariadb ([#29412](https://github.com/aws/aws-cdk/issues/29412)) ([6fef789](https://github.com/aws/aws-cdk/commit/6fef789e14a0f53317da9ca4f319950d33f86ed1)), closes [#29402](https://github.com/aws/aws-cdk/issues/29402)
53+
* **stepfunctions-tasks:** start glue crawler ([#29016](https://github.com/aws/aws-cdk/issues/29016)) ([5592553](https://github.com/aws/aws-cdk/commit/5592553ac5edc6b2c29a786031b8bec139b2aef7)), closes [#24188](https://github.com/aws/aws-cdk/issues/24188)
54+
* update L1 CloudFormation resource definitions ([#29438](https://github.com/aws/aws-cdk/issues/29438)) ([5b910f0](https://github.com/aws/aws-cdk/commit/5b910f0d61d4adae38788f7f16ccdae6cb214057))
55+
56+
57+
### Bug Fixes
58+
59+
* **cli:** `cdk ls` returns stack id instead of stack display name ([#29447](https://github.com/aws/aws-cdk/issues/29447)) ([77189be](https://github.com/aws/aws-cdk/commit/77189be16b4ab007450176010f71f1558ced6430)), closes [#29420](https://github.com/aws/aws-cdk/issues/29420)
60+
* **lambda-nodejs:** fixing esbuildArgs to take in account re-specified keys ([#29167](https://github.com/aws/aws-cdk/issues/29167)) ([919d16f](https://github.com/aws/aws-cdk/commit/919d16ff611ee01495ae2cb4c646c4e27378b3e3)), closes [#25385](https://github.com/aws/aws-cdk/issues/25385)
61+
* **stepfunctions:** the retry field in CustomState is not iterable ([#29403](https://github.com/aws/aws-cdk/issues/29403)) ([a1fbd51](https://github.com/aws/aws-cdk/commit/a1fbd51d7fa6791b6a55004a938ec157194b89ba)), closes [#29274](https://github.com/aws/aws-cdk/issues/29274)
62+
63+
64+
### Reverts
65+
66+
* prevent changeset diff for non-deployed stacks ([#29485](https://github.com/aws/aws-cdk/issues/29485)) ([fac4a9c](https://github.com/aws/aws-cdk/commit/fac4a9c23f8e9090b3dc7e26a8306d3a8034b4c9)), closes [#29394](https://github.com/aws/aws-cdk/issues/29394) [#29172](https://github.com/aws/aws-cdk/issues/29172)
67+
68+
## [2.132.1](https://github.com/aws/aws-cdk/compare/v2.132.0...v2.132.1) (2024-03-12)
69+
70+
71+
### Bug Fixes
72+
73+
* **cli:** `cdk ls` returns stack id instead of stack display name ([#29447](https://github.com/aws/aws-cdk/issues/29447)) ([effad1c](https://github.com/aws/aws-cdk/commit/effad1cf8a854789070e963691b30fadf1597afb)), closes [#29420](https://github.com/aws/aws-cdk/issues/29420)
74+
575
## [2.132.0](https://github.com/aws/aws-cdk/compare/v2.131.0...v2.132.0) (2024-03-08)
676

777

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
"@types/prettier": "2.6.0",
2121
"@yarnpkg/lockfile": "^1.1.0",
2222
"aws-sdk-js-codemod": "^0.28.2",
23-
"cdk-generate-synthetic-examples": "^0.1.304",
23+
"cdk-generate-synthetic-examples": "^0.1.308",
2424
"conventional-changelog-cli": "^2.2.2",
2525
"fs-extra": "^9.1.0",
2626
"graceful-fs": "^4.2.11",
2727
"jest-junit": "^13.2.0",
28-
"jsii-diff": "1.94.0",
29-
"jsii-pacmak": "1.94.0",
30-
"jsii-reflect": "1.94.0",
31-
"jsii-rosetta": "~5.3.18",
28+
"jsii-diff": "1.96.0",
29+
"jsii-pacmak": "1.96.0",
30+
"jsii-reflect": "1.96.0",
31+
"jsii-rosetta": "~5.3.31",
3232
"lerna": "^7.4.2",
3333
"nx": "^16.10.0",
3434
"patch-package": "^6.5.1",

packages/@aws-cdk-testing/cli-integ/lib/aws.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export class AwsClients {
1818
public readonly cloudFormation: AwsCaller<AWS.CloudFormation>;
1919
public readonly s3: AwsCaller<AWS.S3>;
2020
public readonly ecr: AwsCaller<AWS.ECR>;
21+
public readonly ecs: AwsCaller<AWS.ECS>;
2122
public readonly sns: AwsCaller<AWS.SNS>;
2223
public readonly iam: AwsCaller<AWS.IAM>;
2324
public readonly lambda: AwsCaller<AWS.Lambda>;
@@ -34,6 +35,7 @@ export class AwsClients {
3435
this.cloudFormation = makeAwsCaller(AWS.CloudFormation, this.config);
3536
this.s3 = makeAwsCaller(AWS.S3, this.config);
3637
this.ecr = makeAwsCaller(AWS.ECR, this.config);
38+
this.ecs = makeAwsCaller(AWS.ECS, this.config);
3739
this.sns = makeAwsCaller(AWS.SNS, this.config);
3840
this.iam = makeAwsCaller(AWS.IAM, this.config);
3941
this.lambda = makeAwsCaller(AWS.Lambda, this.config);

packages/@aws-cdk-testing/cli-integ/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"license": "Apache-2.0",
3131
"devDependencies": {
3232
"@aws-cdk/cdk-build-tools": "0.0.0",
33-
"@types/semver": "^7.5.7",
33+
"@types/semver": "^7.5.8",
3434
"@types/yargs": "^15.0.19",
3535
"@types/fs-extra": "^9.0.13",
3636
"@types/glob": "^7.2.0",
@@ -39,8 +39,8 @@
3939
},
4040
"dependencies": {
4141
"@octokit/rest": "^18.12.0",
42-
"aws-sdk": "^2.1562.0",
43-
"axios": "^1.6.7",
42+
"aws-sdk": "^2.1586.0",
43+
"axios": "^1.6.8",
4444
"fs-extra": "^9.1.0",
4545
"glob": "^7.2.3",
4646
"jest": "^29.7.0",

packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var constructs = require('constructs');
44
if (process.env.PACKAGE_LAYOUT_VERSION === '1') {
55
var cdk = require('@aws-cdk/core');
66
var ec2 = require('@aws-cdk/aws-ec2');
7+
var ecs = require('@aws-cdk/aws-ecs');
78
var s3 = require('@aws-cdk/aws-s3');
89
var ssm = require('@aws-cdk/aws-ssm');
910
var iam = require('@aws-cdk/aws-iam');
@@ -17,6 +18,7 @@ if (process.env.PACKAGE_LAYOUT_VERSION === '1') {
1718
DefaultStackSynthesizer,
1819
LegacyStackSynthesizer,
1920
aws_ec2: ec2,
21+
aws_ecs: ecs,
2022
aws_s3: s3,
2123
aws_ssm: ssm,
2224
aws_iam: iam,
@@ -357,6 +359,60 @@ class LambdaHotswapStack extends cdk.Stack {
357359
}
358360
}
359361

362+
class EcsHotswapStack extends cdk.Stack {
363+
constructor(parent, id, props) {
364+
super(parent, id, props);
365+
366+
// define a simple vpc and cluster
367+
const vpc = new ec2.Vpc(this, 'vpc', {
368+
natGateways: 0,
369+
subnetConfiguration: [
370+
{
371+
cidrMask: 24,
372+
name: 'Public',
373+
subnetType: ec2.SubnetType.PUBLIC,
374+
},
375+
],
376+
maxAzs: 1,
377+
});
378+
const cluster = new ecs.Cluster(this, 'cluster', {
379+
vpc,
380+
});
381+
382+
// allow stack to be used to test failed deployments
383+
const image =
384+
process.env.USE_INVALID_ECS_HOTSWAP_IMAGE == 'true'
385+
? 'nginx:invalidtag'
386+
: 'nginx:alpine';
387+
388+
// deploy basic service
389+
const taskDefinition = new ecs.FargateTaskDefinition(
390+
this,
391+
'task-definition'
392+
);
393+
taskDefinition.addContainer('nginx', {
394+
image: ecs.ContainerImage.fromRegistry(image),
395+
environment: {
396+
SOME_VARIABLE: process.env.DYNAMIC_ECS_PROPERTY_VALUE ?? 'environment',
397+
},
398+
healthCheck: {
399+
command: ['CMD-SHELL', 'exit 0'], // fake health check to speed up deployment
400+
interval: cdk.Duration.seconds(5),
401+
},
402+
});
403+
const service = new ecs.FargateService(this, 'service', {
404+
cluster,
405+
taskDefinition,
406+
assignPublicIp: true, // required without NAT to pull image
407+
circuitBreaker: { rollback: false },
408+
desiredCount: 1,
409+
});
410+
411+
new cdk.CfnOutput(this, 'ClusterName', { value: cluster.clusterName });
412+
new cdk.CfnOutput(this, 'ServiceName', { value: service.serviceName });
413+
}
414+
}
415+
360416
class DockerStack extends cdk.Stack {
361417
constructor(parent, id, props) {
362418
super(parent, id, props);
@@ -532,6 +588,7 @@ switch (stackSet) {
532588

533589
new LambdaStack(app, `${stackPrefix}-lambda`);
534590
new LambdaHotswapStack(app, `${stackPrefix}-lambda-hotswap`);
591+
new EcsHotswapStack(app, `${stackPrefix}-ecs-hotswap`);
535592
new DockerStack(app, `${stackPrefix}-docker`);
536593
new DockerStackWithCustomFile(app, `${stackPrefix}-docker-with-custom-file`);
537594
const failed = new FailedStack(app, `${stackPrefix}-failed`)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This patch brings the [fix](https://github.com/aws/aws-cdk/issues/29420) into the regression suite.

0 commit comments

Comments
 (0)