DVA-C02 · Question #422
DVA-C02 Question #422: Real Exam Question with Answer & Explanation
The correct answer is B: Configure DynamoDB Streams to invoke an AWS Lambda function. Program the Lambda. DynamoDB Streams captures TTL-deleted items and can trigger Lambda to process and write them to S3, requiring no additional polling infrastructure.
Question
A developer is creating an application that must transfer expired items from Amazon DynamoDB to Amazon S3. The developer sets up the DynamoDB table to automatically delete items after a specific TTL. The application must process the items in DynamoDB and then must store the expired items in Amazon S3. The entire process, including item processing and storage in Amazon S3, will take 5 minutes. Which solution will meet these requirements with the LEAST operational overhead?
Options
- AConfigure DynamoDB Accelerator (DAX) to query for expired items based on the TTL. Save the
- BConfigure DynamoDB Streams to invoke an AWS Lambda function. Program the Lambda
- CDeploy a custom application on an Amazon Elastic Container Service (Amazon ECS) cluster on
- DCreate an Amazon EventBridge rule to invoke an AWS Lambda function. Program the Lambda
Explanation
DynamoDB Streams captures TTL-deleted items and can trigger Lambda to process and write them to S3, requiring no additional polling infrastructure.
Common mistakes.
- A. DynamoDB Accelerator (DAX) is an in-memory read cache and does not emit events for TTL-expired items; it cannot be configured to query for deleted items.
- C. Deploying a custom ECS cluster requires provisioning, scaling, and maintaining container infrastructure, which introduces significant operational overhead compared to a Lambda-based solution.
- D. An EventBridge rule on a schedule would require the Lambda to query DynamoDB for recently expired items, adding complexity and potential timing gaps; it does not react to deletions as they happen.
Concept tested. DynamoDB Streams with Lambda for TTL-expired item processing
Reference. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/time-to-live-ttl-streams.html
Community Discussion
No community discussion yet for this question.