Skip to content

Lambda ecs durable python sam#2953

Open
4D54 wants to merge 7 commits intoaws-samples:mainfrom
4D54:lambda-ecs-durable-python-sam
Open

Lambda ecs durable python sam#2953
4D54 wants to merge 7 commits intoaws-samples:mainfrom
4D54:lambda-ecs-durable-python-sam

Conversation

@4D54
Copy link

@4D54 4D54 commented Feb 12, 2026

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.

4D54 added 3 commits February 5, 2026 19:46
- 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
@rohanmeh
Copy link

@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
send_durable_execution_callback_heartbeat
send_durable_execution_callback_success

@bfreiberg
Copy link
Contributor

And please make sure to use the correct capitalization: It's Lambda durable functions not Lambda Durable Functions

@bfreiberg bfreiberg added the durable functions Pattern for AWS Lambda durable functions label Feb 19, 2026
… 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
@4D54
Copy link
Author

4D54 commented Mar 2, 2026

Fixed! Thanks @rohanmeh @bfreiberg

Copy link
Contributor

@ellisms ellisms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission @4D54 . Requesting a few changes.

- Scope ecs:RunTask to specific task definitions instead of wildcard
- Scope ecs:DescribeTasks to cluster tasks
- Scope CheckpointDurableExecutions to specific function with
  durable-execution/* path
- Fix directory name in README to lambda-ecs-durable-python-sam
- Add expected test output for sync and callback patterns
- Lowercase durable functions throughout docs
- Add LinkedIn profile
- Tested: both sync and callback patterns verified in CloudShell
@4D54
Copy link
Author

4D54 commented Mar 16, 2026

Thanks for the submission @4D54 . Requesting a few changes.

fixed! @ellisms thanks a lot for your review!

@ellisms
Copy link
Contributor

ellisms commented Mar 18, 2026

Thanks @4D54 - adding this to the publishing queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

durable functions Pattern for AWS Lambda durable functions Patterns Guardian approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants