Skip to content

feat: Add waitForCondition polling and idempotency tokens#3052

Open
4D54 wants to merge 2 commits intoaws-samples:mainfrom
4D54:lambda-ecs-durable-improvements
Open

feat: Add waitForCondition polling and idempotency tokens#3052
4D54 wants to merge 2 commits intoaws-samples:mainfrom
4D54:lambda-ecs-durable-improvements

Conversation

@4D54
Copy link
Copy Markdown

@4D54 4D54 commented Apr 16, 2026

  • sync_handler: Replace manual for loop with context.wait_for_condition() using WaitForConditionConfig and WaitForConditionDecision from SDK
  • sync_handler: Add clientToken to ecs:RunTask for idempotency on retry
  • callback_handler: Add clientToken (hash of callback token) to ecs:RunTask to prevent duplicate tasks if step retries before checkpoint
  • Tested: both patterns verified in CloudShell

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.

- sync_handler: Replace manual for loop with context.wait_for_condition()
  using WaitForConditionConfig and WaitForConditionDecision from SDK
- sync_handler: Add clientToken to ecs:RunTask for idempotency on retry
- callback_handler: Add clientToken (hash of callback token) to ecs:RunTask
  to prevent duplicate tasks if step retries before checkpoint
- Tested: both patterns verified in CloudShell
@biswanathmukherjee
Copy link
Copy Markdown
Contributor

@4D54
I got the following error while deploying the pattern. Can you please add a prerequisite in the readme file for Flinch installation and provide link to the installation step?

Valid administrator container preference: Finch.                                                                
Error: Running AWS SAM projects locally requires Finch. Do you have Finch installed and running?```

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants