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
…ttern - Replace sfn-ecs-python-sam with lambda-ecs-python-sam - Implement synchronous pattern with polling using context.wait() - Implement callback pattern with DynamoDB state tracking - Use Python 3.13 with container image deployment - Support durable execution for workflows up to 1 year - Reduce costs with no charges during context.wait() periods
|
@4D54 instead of storing the callback token in dynamodb, the ecs task can call these to send the callback token to the lambda service directly? send_durable_execution_callback_failure |
|
And please make sure to use the correct capitalization: It's Lambda durable functions not Lambda Durable Functions |
… APIs - callback_handler: Use context.create_callback() and callback.result() instead of DynamoDB-based polling - template.yaml: Remove CallbackTable, update ECSTaskRole with durable execution callback permissions, fix IAM circular dependency using Sub with explicit ARN construction - ECS task now calls SendDurableExecutionCallbackSuccess/Failure directly - README restructured to match serverless-patterns format
|
Fixed! Thanks @rohanmeh @bfreiberg |
| Statement: | ||
| - Effect: Allow | ||
| Action: | ||
| - ecs:RunTask |
There was a problem hiding this comment.
RunTask should be scoped to a specific task.
| Action: | ||
| - ecs:RunTask | ||
| - ecs:DescribeTasks | ||
| Resource: '*' |
There was a problem hiding this comment.
This should be scoped to the specific tasks being run.
| Action: | ||
| - lambda:CheckpointDurableExecutions | ||
| - lambda:GetDurableExecutionState | ||
| Resource: '*' |
There was a problem hiding this comment.
This should be scoped to at least the function name, with wildcards for the individual executions.
| ``` | ||
| 1. Change directory to the pattern directory: | ||
| ``` | ||
| cd lambda-ecs-python-sam |
There was a problem hiding this comment.
I think this should be lambda-ecs-durable-python-sam
| response.json | ||
|
|
||
| # Monitor Lambda logs | ||
| aws logs tail /aws/lambda/$SYNC_FUNCTION --follow |
There was a problem hiding this comment.
What information determines a successful test?
| "resources": { | ||
| "bullets": [ | ||
| { | ||
| "text": "Lambda Durable Functions", |
There was a problem hiding this comment.
| "text": "Lambda Durable Functions", | |
| "text": "Lambda durable functions", |
| AWSTemplateFormatVersion: '2010-09-09' | ||
| Transform: AWS::Serverless-2016-10-31 | ||
| Description: > | ||
| Lambda Durable Functions to ECS with Python - Demonstrates durable execution patterns with ECS tasks |
There was a problem hiding this comment.
| Lambda Durable Functions to ECS with Python - Demonstrates durable execution patterns with ECS tasks | |
| Lambda durable functions to ECS with Python - Demonstrates durable execution patterns with ECS tasks |
| @@ -0,0 +1,138 @@ | |||
| # Lambda Durable Functions to Amazon ECS with Python | |||
There was a problem hiding this comment.
| # Lambda Durable Functions to Amazon ECS with Python | |
| # AWS Lambda durable functions to Amazon ECS with Python |
| "authors": [ | ||
| { | ||
| "name": "Mian Tariq", | ||
| "image": "", |
There was a problem hiding this comment.
Do you have a publicly available image?
| "name": "Mian Tariq", | ||
| "image": "", | ||
| "bio": "Senior Delivery Consultant", | ||
| "linkedin": "" |
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.