Skip to content

docs(power): "When to use each" table has AtMostOncePerRetry and AtLeastOncePerRetry use cases swapped#175

Open
TrickSumo wants to merge 1 commit into
aws:mainfrom
TrickSumo:patch-5
Open

docs(power): "When to use each" table has AtMostOncePerRetry and AtLeastOncePerRetry use cases swapped#175
TrickSumo wants to merge 1 commit into
aws:mainfrom
TrickSumo:patch-5

Conversation

@TrickSumo
Copy link
Copy Markdown
Contributor

Problem

The "When to use each" table in advanced-patterns.md has the use cases completely reversed:

Current (wrong):

Semantic Use When Example Operations
AtMostOncePerRetry Operation is idempotent Database updates, API calls with idempotency keys
AtLeastOncePerRetry External deduplication exists Queuing systems, event streams

Why This Is Wrong

AtMostOncePerRetry is designed for non-idempotent operations. The SDK waits for the START checkpoint before executing, so if Lambda crashes mid-step, the step is skipped on replay rather than re-executed.

AtLeastOncePerRetry is designed for idempotent operations.

Source

The SDK's own JSDoc in src/types/step.ts confirms:

// At-least-once per retry (default) - safe for idempotent operations
{ semantics: StepSemantics.AtLeastOncePerRetry }

// At-most-once per retry - for non-idempotent operations
{ semantics: StepSemantics.AtMostOncePerRetry }

bug: advanced-patterns.md "When to use each" table has AtMostOncePerRetry and AtLeastOncePerRetry use cases swapped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant