Skip to content

Commit

Permalink
feat(events-targets): support enableExecuteCommand in EcsTask constru…
Browse files Browse the repository at this point in the history
…ct (#25639)

Users can run commands in or get a shell to a container running on an Amazon EC2 instance or on AWS Fargate with Amazon ECS Exec.

`FargateService` and `Ec2Service` in `aws-ecs` supports the flag to enable Amazon ECS Exec, `enableExecuteCommand`.
`EcsTask` in `aws-events-targets` also supports `enableExecuteCommand` in CloudFormation, but AWS CDK doesn't.
This feature supports `enableExecuteCommand` flag also for `EcsTask`.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
ymhiroki committed Jun 4, 2023
1 parent 5837373 commit 7f3152a
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 70 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "29.0.0",
"version": "31.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "29.0.0",
"version": "31.0.0",
"files": {
"30cd2908bd974e2e1f17ce2fd217f78c8377a301b45a4b7a471e00c77fdff513": {
"4eef78557096850d7999e5b8dea53c92d3dfecb6360d19bff549c574432580e1": {
"source": {
"path": "aws-ecs-integ-fargate.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "30cd2908bd974e2e1f17ce2fd217f78c8377a301b45a4b7a471e00c77fdff513.json",
"objectKey": "4eef78557096850d7999e5b8dea53c92d3dfecb6360d19bff549c574432580e1.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@
}
},
"EcsParameters": {
"EnableExecuteCommand": true,
"LaunchType": "FARGATE",
"NetworkConfiguration": {
"AwsVpcConfiguration": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"21.0.0"}
{"version":"31.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "29.0.0",
"version": "31.0.0",
"testCases": {
"EcsFargateTest/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "29.0.0",
"version": "31.0.0",
"artifacts": {
"aws-ecs-integ-fargate.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/30cd2908bd974e2e1f17ce2fd217f78c8377a301b45a4b7a471e00c77fdff513.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4eef78557096850d7999e5b8dea53c92d3dfecb6360d19bff549c574432580e1.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down

0 comments on commit 7f3152a

Please sign in to comment.