Add Step Functions to ECS Python integration pattern (sfn-ecs-python-sam)#2927
Open
4D54 wants to merge 2 commits intoaws-samples:mainfrom
Open
Add Step Functions to ECS Python integration pattern (sfn-ecs-python-sam)#29274D54 wants to merge 2 commits intoaws-samples:mainfrom
4D54 wants to merge 2 commits intoaws-samples:mainfrom
Conversation
- Demonstrates synchronous (polling) and callback integration patterns - Includes inline Python code in ECS task definitions - Complete SAM template with VPC, networking, and IAM roles - Comprehensive documentation and testing instructions
- Document permissive IAM and security group configurations - Explain why they exist (demo/learning purposes) - Provide production security recommendations - Recommend deployment in non-production environments
ellisms
requested changes
Mar 2, 2026
| awslogs-stream-prefix: callback | ||
|
|
||
| # Step Functions Role | ||
| StepFunctionsRole: |
Contributor
There was a problem hiding this comment.
Recommend scoping this policy down to only the task and cluster being acted upon.
| - `SyncStateMachineArn` - ARN for the synchronous pattern | ||
| - `CallbackStateMachineArn` - ARN for the callback pattern | ||
| - `ECSClusterName` - Name of the ECS cluster | ||
| - `TaskDefinitionArn` - ARN of the task definition |
Contributor
There was a problem hiding this comment.
This output isn't included in the template outputs. Please check.
| aws logs tail /ecs/sfn-ecs-python-callback --follow | ||
| ``` | ||
|
|
||
| 4. **The task will automatically send the callback** when processing completes. |
Contributor
There was a problem hiding this comment.
The callback execution failed in my test:
The ECS task did not send a callback within the timeout period
The ECS task log has the following:
[CALLBACK] ERROR: An error occurred (TaskTimedOut) when calling the SendTaskSuccess operation: Task Timed Out: 'Provided task does not exist anymore'
[CALLBACK] Failed to send callback: An error occurred (TaskTimedOut) when calling the SendTaskFailure operation: Task Timed Out: 'Provided task does not exist anymore'
|
|
||
| --- | ||
|
|
||
| Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
Contributor
There was a problem hiding this comment.
Suggested change
| Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
| Copyright 2026 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| "authors": [ | ||
| { | ||
| "name": "Mian Tariq", | ||
| "image": "", |
Contributor
There was a problem hiding this comment.
Please add a publicly accessible image.
| "name": "Mian Tariq", | ||
| "image": "", | ||
| "bio": "Senior Delivery Consultant", | ||
| "linkedin": "" |
| @@ -0,0 +1,365 @@ | |||
| # AWS Step Functions to Amazon ECS with Python | |||
Contributor
There was a problem hiding this comment.
Suggested change
| # AWS Step Functions to Amazon ECS with Python | |
| # AWS Step Functions to Amazon Elastic Container Service (Amazon ECS) with Python |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.