AWS Certified Database – Specialty — Question 299

A company stores session history for its users in an Amazon DynamoDB table. The company has a large user base and generates large amounts of session data.
Teams analyze the session data for 1 week, and then the data is no longer needed. A database specialist needs to design an automated solution to purge session data that is more than 1 week old.
Which strategy meets these requirements with the MOST operational efficiency?

Answer options

Correct answer: D

Explanation

Enabling Time to Live (TTL) is the most operationally efficient strategy because DynamoDB automatically identifies and deletes expired items at no additional cost, eliminating the need to write and maintain custom code. Options A, B, and C introduce unnecessary operational overhead and cost by requiring additional AWS services like AWS Lambda, AWS Step Functions, and DynamoDB Streams to manage the deletion process. TTL natively uses a Number data type representing epoch time to automatically handle item expiration.