-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(stepfunctions-tasks): missing permissions for running tasks on ecs (
#27891) While working on [#27803](#27803), I noticed the integration tests for `aws-stepfunctions-tasks/ecs` were not fully working (they deployed but the state machines did not run successfully). This PR addresses two issues: 1. Missing permissions for `ecs:RunTask` on the task definition version. <img width="1587" alt="sfn-role" src="https://github.com/aws/aws-cdk/assets/3310356/13a0d402-8cbb-4852-9708-290f3a3b6711"> 2. The sample container was from a Lambda image. This resulted in the following error: `entrypoint requires the handler name to be the first argument`. I changed the image to `docker/library/python:3.12`. These changes result in the successful execution of all four state machines in `aws-stepfunctions-tasks/ecs`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
53 changed files
with
3,669 additions
and
2,524 deletions.
There are no files selected for viewing
8 changes: 3 additions & 5 deletions
8
...sting/framework-integ/test/aws-stepfunctions-tasks/test/ecs/eventhandler-image/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
FROM public.ecr.aws/lambda/python:3.6 | ||
EXPOSE 8000 | ||
WORKDIR /src | ||
ADD . /src | ||
CMD python3 index.py | ||
FROM public.ecr.aws/docker/library/python:3.12 | ||
ADD index.py . | ||
CMD [ "python3", "./index.py" ] |
1 change: 0 additions & 1 deletion
1
...testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/eventhandler-image/index.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/python | ||
import os | ||
import pprint | ||
|
||
|
19 changes: 19 additions & 0 deletions
19
...run-task.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
...n-task.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.template.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...napshot/asset.7a4895bc694ae074467753dddb9a798e58f2f5eda62bcce5833d7d356b8a1da2/Dockerfile
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...napshot/asset.d87af9b5acc567118fa529d3d3b763098200a6446a5ca64aea987729efd52534/Dockerfile
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...58f2f5eda62bcce5833d7d356b8a1da2/index.py → ...8200a6446a5ca64aea987729efd52534/index.py
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 7 additions & 7 deletions
14
...sk.js.snapshot/aws-ecs-integ2.assets.json → ...ot/aws-sfn-tasks-ecs-run-task.assets.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.