
Answer-first summary for fast verification
Answer: By using the Time To Live feature with an expiration time attribute in DynamoDB.
The simplest way to automatically delete old items from an Amazon DynamoDB table is by using the Time To Live (TTL) feature. Option B is correct because TTL allows you to define an attribute that stores the expiration time for each item. Once the specified time has passed, DynamoDB automatically deletes the expired items, freeing up storage and reducing costs without the need for custom scripts or manual intervention.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can a company automate the deletion of old session items in an Amazon DynamoDB table?
A
By scripting and scheduling a cron job on an EC2 instance to delete old records.
B
By using the Time To Live feature with an expiration time attribute in DynamoDB.
C
By creating a new table daily for session data and deleting the previous day's table.
D
By adding an expiration time attribute and naming it ItemExpiration.
No comments yet.