Idempotency is one of the most important patterns in distributed systems — and one of the most commonly skipped. This video covers everything you need to know to implement it correctly on AWS: why duplicate calls are unavoidable, how the idempotency key pattern works, and how to build an atomic, race-condition-free implementation using DynamoDB conditional writes.
We also cover AWS Lambda Powertools' built-in idempotency decorator, the five mistakes that break most implementations, and a real-world incident — Cash App's June 2023 double-charge bug — that shows exactly what this failure looks like at scale.
What's covered:
Lambda at-least-once execution, SQS at-least-once delivery, API Gateway retries, Step Functions retries — where duplicates come from
The idempotency key pattern and where to source the key in AWS
Check-then-act vs atomic conditional write — why one is a race condition
DynamoDB attribute_not_exists condition expression
TTL on idempotency records
Lambda Powertools idempotency module
Five common mistakes: non-unique keys, not storing the response, wrong layer, no TTL, making it optional
Chapters:
00:00 Double Charge Nightmare
00:45 Cash App Duplicate Charges
01:56 Why Idempotency Matters
02:23 Idempotency Explained Simply
03:11 Where Duplicates Come From
5:16 Idempotency Key Pattern
06:44 Naive Check Then Act
07:25 DynamoDB Conditional Writes
08:11 TTL and Power Tools
09:35 Common Idempotency Mistakes
11:02 Pre-Ship Checklist
🔗 Links:
→ Previous video — Retry Strategies: • The AWS SDK retry bug hiding in your Lambd...
→ Lambda Powertools idempotency: https://docs.powertools.aws.dev/lambd...
→ Cash App incident: https://www.nbcdfw.com/news/business/...
Part of the System Architecture Patterns series.
In questa pagina del sito puoi guardare il video online AWS Idempotency explained: prevent duplicate charges with DynamoDB and Lambda della durata di ore minuti seconda in buona qualità , che l'utente ha caricato CloudMeatAndBones 18 aprile 2026, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 40 volte e gli è piaciuto 0 spettatori. Buona visione!