AWS Certified Database – Specialty — Question 3
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?
Answer options
- A. Create a new attribute in each table to track the expiration time and create an AWS Glue transformation to delete entries more than 2 days old.
- B. Create a new attribute in each table to track the expiration time and enable DynamoDB Streams on each table.
- C. Create a new attribute in each table to track the expiration time and enable time to live (TTL) on each table.
- D. Create an Amazon CloudWatch Events event to export the data to Amazon S3 daily using AWS Data Pipeline and then truncate the Amazon DynamoDB table.
Correct answer: C
Explanation
The correct answer is C, as enabling time to live (TTL) allows DynamoDB to automatically delete items after a specified time period, reducing storage costs effectively. Options A and B involve manual processes that do not provide automatic deletion and could lead to increased costs. Option D suggests exporting data, which is unnecessary when TTL can handle automatic deletions efficiently.