DynamoDB TTL automatically deletes items after a timestamp you set, at no extra cost. It’s the clean way to expire old data — sessions, temporary records, event data — without running your own cleanup jobs.
The tell
When a scenario needs to automatically remove expired items from a DynamoDB table (session data, logs older than X days) without extra cost or custom deletion code, that’s TTL. You store an expiry timestamp attribute and DynamoDB deletes items past it.
Test yourself
A DynamoDB table stores user sessions that should be automatically removed 24 hours after creation, with no cleanup job to maintain. What do you use?
- A scheduled Lambda that scans and deletes
- DynamoDB TTL on an expiry timestamp attribute
- DynamoDB Streams
- A shorter backup retention
👉 Click to reveal the answer & explanation
Correct answer: B. DynamoDB TTL auto-deletes items past their expiry timestamp at no extra cost and no code. A scheduled scan-and-delete (A) is costly and complex; Streams (C) capture changes, they don’t expire items; backup retention (D) is unrelated.
Related topics
Amazon DynamoDB · DynamoDB Streams · DynamoDB capacity modes
Ready to pass the AWS Data Engineer Associate (DEA-C01)?
Stop guessing whether you’re ready. Our full-length, exam-realistic practice exams put you through the exact question style you’ll face — with a detailed explanation behind every answer, so you learn why, not just what.
- ✓ 6 full-length practice exams
- ✓ A detailed explanation for every single question
- ✓ Realistic, scenario-based questions — not memory dumps
- ✓ Lifetime access, kept current for 2026
Get the DEA-C01 Practice Exams →or try 25 free questions first