How to Automatically Remove Old DynamoDB User Responses with Least Effort?
Short answer
D Enable TTL on the DynamoDB table and specify the expiration_date attribute. Expire old user responses by using DynamoDB TTL.
Question
Key Takeaways
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.
Common mistake: 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.
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 command aws 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
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html
- https://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-time-to-live.html
These links open the official vendor documentation in a new tab.
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.
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
tomchandler077 👍 1To deploy an AWS Lambda function using AWS CloudFormation, especially when the function code is stored in an Amazon S3 bucket, the developer should reference the S3 location directly in the CloudFormation template. The best option to achieve this with the least development effort is: Option D directly links the Lambda function's deployment package stored in S3 to the CloudFormation template, which automates the deployment process without requiring additional steps for handling the function code.
-
albert_kuo 👍 1 Answered D1. enable ttl aws dynamodb update-time-to-live \ --table-name <your-table-name> \ --time-to-live-specification "Enabled=true, AttributeName=expiration_date" 2.Set TTL aws dynamodb describe-time-to-live --table-name <your-table-name>
-
monishvster 👍 4 Answered DAlways TTL
-
CrescentShared 👍 3 Answered DIt's D.
-
65703c1 👍 1 Answered DD is the correct answer.
Show 1 more comment
-
Americo32 👍 1Opção A
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →