Q29 — AWS DVA-C02 Ch.1

Question 29 of 100 | ← Chapter 1

A company runs its website on AWS. The company publishes polls daily and releases poll results the following day. The website stores user responses in an Amazon DynamoDB table. After releasing poll results, the company no longer needs to retain user responses. A developer must implement a solution that automatically deletes old user responses from the DynamoDB table. The developer has added a new expiration_date attribute to the DynamoDB table and plans to use it for automation. Which solution meets these requirements with the least development effort?

Correct Answer: D. Enable Time-to-Live (TTL) on the DynamoDB table and specify the expiration_date attribute. Use DynamoDB TTL to expire and delete old user responses.

Explanation

Enabling DynamoDB TTL and specifying the expiration_date attribute is the simplest solution. DynamoDB automatically expires and deletes items with expired timestamps without requiring custom code or additional AWS services—minimizing development effort while meeting the requirement.