Q29 — AWS DVA-C02 Ch.2

Question 29 of 100 | ← Chapter 2

A company built a live quiz platform. For each quiz, the company generates a leaderboard based on scores. Leaderboard data is stored in Amazon DynamoDB and retained for 30 days after the quiz ends. Later, the company uses a scheduled job to delete old leaderboard data. The DynamoDB table is configured with provisioned write capacity. During months with frequent quizzes, the scheduled deletion job triggers write throttling (ProvisionedThroughputExceededException). Developers need a long-term solution to delete old leaderboard data while minimizing write capacity consumption. Which solution meets these requirements?

Correct Answer: A. Configure a TTL (Time-to-Live) attribute for leaderboard data.

Explanation

Option A is correct: configuring a TTL attribute enables DynamoDB to automatically expire and delete items after a specified timestamp—eliminating the need for manual deletion jobs and avoiding write capacity contention entirely. TTL deletion is performed asynchronously by DynamoDB using spare capacity, imposing zero write cost on the table. Option B is invalid: DynamoDB Streams capture item changes but cannot trigger or schedule deletions. Option C adds unnecessary orchestration complexity and still consumes write capacity. Option D violates scalability best practices and incurs higher costs without addressing root cause.