AWS Certified Developer – Associate — Question 306
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 DynamoDB Time to Live (TTL) allows the system to automatically delete expired items without consuming any of the table's provisioned write throughput. This completely eliminates the write throttling issues during peak periods. Other solutions, such as using AWS Step Functions or increasing write capacity, either still consume write capacity units (WCUs) or introduce unnecessary complexity and cost.