AWS Certified Developer – Associate (DVA-C02) — Question 270
A company built an online event platform. For each event, the company organizes quizzes and generates leaderboards that are based on the quiz scores. The company stores the leaderboard data in Amazon DynamoDB and retains the data for 30 days after an event is complete. The company then uses a scheduled job to delete the old leaderboard data.
The DynamoDB table is configured with a fixed write capacity. During the months when many events occur, the DynamoDB write API requests are throttled when the scheduled delete job runs.
A developer must create a long-term solution that deletes the old leaderboard data and optimizes write throughput.
Which solution meets these requirements?
Answer options
- A. Configure a TTL attribute for the leaderboard data.
- B. Use DynamoDB Streams to schedule and delete the leaderboard data.
- C. Use AWS Step Functions to schedule and delete the leaderboard data.
- D. Set a higher write capacity when the scheduled delete job runs.
Correct answer: A
Explanation
Enabling Amazon DynamoDB Time to Live (TTL) allows the system to automatically delete expired items based on a timestamp attribute without using any provisioned write capacity units. This completely avoids write API throttling and eliminates the need for a custom scheduled delete job. Other solutions, such as scaling up write capacity or orchestrating deletes with AWS Step Functions, still consume write throughput and incur additional costs.