AWS Idempotency explained: prevent duplicate charges with DynamoDB and Lambda

Veröffentlicht am: 18 April 2026
auf dem Kanal: CloudMeatAndBones
40
0

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.


Auf dieser Seite können Sie das Online-Video AWS Idempotency explained: prevent duplicate charges with DynamoDB and Lambda mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer CloudMeatAndBones 18 April 2026 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 40 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!