DBS-C01 · Question #49
A company is concerned about the cost of a large-scale, transactional application using Amazon DynamoDB that only needs to store data for 2 days before it is deleted. In looking at the tables, a…
The correct answer is C. Create a new attribute in each table to track the expiration time and enable time to live (TTL) on. DynamoDB TTL for Automatic Data Expiration Option C is correct because DynamoDB's Time to Live (TTL) feature allows you to define a per-item expiration timestamp attribute, after which DynamoDB automatically deletes expired items at no additional cost - making it the most…
Question
A company is concerned about the cost of a large-scale, transactional application using Amazon DynamoDB that only needs to store data for 2 days before it is deleted. In looking at the tables, a Database Specialist notices that much of the data is months old, and goes back to when the application was first deployed. What can the Database Specialist do to reduce the overall cost?
Options
- ACreate a new attribute in each table to track the expiration time and create an AWS Glue
- BCreate a new attribute in each table to track the expiration time and enable DynamoDB Streams
- CCreate a new attribute in each table to track the expiration time and enable time to live (TTL) on
- DCreate an Amazon CloudWatch Events event to export the data to Amazon S3 daily using AWS
How the community answered
(43 responses)- A5% (2)
- B2% (1)
- C91% (39)
- D2% (1)
Explanation
DynamoDB TTL for Automatic Data Expiration
Option C is correct because DynamoDB's Time to Live (TTL) feature allows you to define a per-item expiration timestamp attribute, after which DynamoDB automatically deletes expired items at no additional cost - making it the most efficient and cost-effective solution for purging stale data without manual intervention.
Why the distractors are wrong:
- Option A (AWS Glue) is designed for ETL/data cataloging workflows, not for automatically deleting expired items - it adds unnecessary complexity and cost.
- Option B (DynamoDB Streams) captures data change events for downstream processing but does not automatically delete items; you'd still need additional Lambda logic, adding cost and complexity.
- Option D (CloudWatch Events + S3 export) moves data to S3 but doesn't delete it from DynamoDB, so it doesn't reduce DynamoDB storage costs directly, and introduces additional operational overhead.
Memory Tip: Think of TTL as a "self-destruct timer" - you stamp each item with an expiration time, and DynamoDB quietly cleans it up for free. Whenever an exam question mentions automatic deletion or data retention windows in DynamoDB, TTL is almost always the answer.
Topics
Community Discussion
No community discussion yet for this question.