Q9 — AWS DVA-C02 Ch.1

Question 9 of 100 | ← Chapter 1

A company caches web application session data in an Amazon DynamoDB table. The company wants an automated method to delete old items from the table. What is the simplest solution?

Correct Answer: B. Add an expiration timestamp attribute; enable Time-to-Live (TTL) based on that attribute.

Explanation

Option B is the simplest solution. In Amazon DynamoDB, adding an expiration timestamp attribute and enabling Time-to-Live (TTL) based on that attribute automatically deletes old items without requiring manual scripting or complex table operations. Option A introduces unnecessary complexity and maintenance overhead. Option C is overly cumbersome and inefficient. Option D adds an attribute but does not enable TTL functionality, so it cannot achieve automatic deletion. Therefore, Option B is optimal.