How to Automatically Remove Old DynamoDB User Responses with Least Effort?
A company runs its website on AWS. The company posts daily polls on its website and publishes the poll results next day. The website stores user responses in an Amazon DynamoDB table. After the poll results are published, the company does not need to keep the user responses. A developer needs to implement a solution that will automatically remove old user responses from the DynamoDB table. The developer adds a new expiration_date attribute to the DynamoDB table. The developer plans to use the expiration_date attribute for the automation. Which solution will meet these requirements with the LEAST development effort?
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The question tests whether you recognize DynamoDB TTL as a native, serverless feature for item expiration; the trap is choosing a custom compute solution like Lambda that requires more development effort.
The correct answer is D: enabling DynamoDB TTL on the expiration_date attribute, which automatically expires old items without custom code. Community consensus strongly supports this as the least development effort solution.
Choosing A (Lambda + EventBridge) is common because developers often think of scheduled deletion jobs, but TTL is built-in, free, and requires no code or infrastructure management.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option D is correct because DynamoDB TTL is specifically designed to expire items automatically based on an attribute (expiration_date). It requires only enabling TTL with a CLI command or console setting, and DynamoDB handles deletion in the background, consuming no read/write capacity and incurring no extra cost. This is the true 'least development effort' approach compared to writing and maintaining custom code.Why the Other Options Are Wrong
Options A, B, and C all require building and managing compute resources (Lambda, Fargate, or Glue), writing logic to query and delete items, and setting up schedules. They are over-engineered for a simple expiration requirement. Lambda (A) is serverless but still requires code and IAM roles; Fargate (B) requires container management; Glue (C) is a heavy ETL service designed for data transformation, not simple deletions. None offer the automatic, no-code efficiency of TTL.Community Comment Notes
Comments strongly favor TTL: one comment (1) provides the exact AWS CLI commandaws dynamodb update-time-to-live to enable TTL, showing its simplicity. Another comment (3) succinctly notes 'Always TTL', reinforcing that TTL is the go-to solution for expiring DynamoDB items. A third comment (4) simply states 'It's D', indicating community consensus. There was no significant support for alternatives. Official Reference
Exam Strategy
When a question asks for 'least development effort' for expiring data in DynamoDB, immediately choose TTL. Only consider Lambda, ECS, or Glue if the question specifies constraints that TTL cannot satisfy, such as a complex deletion logic or a need to archive data before deletion.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →