BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon Exam DVA-C02 Topic 7 Question 23 Discussion

Actual exam question for Amazon's DVA-C02 exam
Question #: 23
Topic #: 7
[All DVA-C02 Questions]

A developer supports an application that accesses data in an Amazon DynamoDB table. One of the item attributes is expirationDate in the timestamp format. The application uses this attribute to find items, archive them, and remove them from the table based on the timestamp value

The application will be decommissioned soon, and the developer must find another way to implement this functionality. The developer needs a solution that will require the least amount of code to write.

Which solution will meet these requirements?

Show Suggested Answer Hide Answer
Suggested Answer: A

TTL for Automatic Deletion:DynamoDB's Time-to-Live effortlessly deletes expired items without manual intervention.

DynamoDB Stream:Captures changes to the table, including deletions of expired items, triggering downstream actions.

Lambda for Processing:A Lambda function connected to the stream provides custom logic for handling the deleted items.

Code Efficiency:This solution leverages native DynamoDB features and stream-based processing, minimizing the need for custom code.


DynamoDB TTL Documentation:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html

DynamoDB Streams Documentation:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html

Contribute your Thoughts:

Nada
5 months ago
Option D seems simpler to me, just enabling TTL and using SQS for processing items
upvoted 0 times
...
France
5 months ago
I prefer option C, using Amazon EventBridge for scheduling the Lambda functions
upvoted 0 times
...
Selene
5 months ago
I agree, using a DynamoDB stream with a Lambda function is efficient
upvoted 0 times
...
Ariel
5 months ago
I think the best option is A
upvoted 0 times
...
Maile
5 months ago
That's true, It might be beneficial to use different Lambda functions for deleting and processing items.
upvoted 0 times
...
Skye
5 months ago
Option C also seems viable. Using Amazon EventBridge for scheduled rules could be a good alternative.
upvoted 0 times
...
Javier
6 months ago
I agree with Creating a DynamoDB stream and Lambda function for deleted items seems like a good approach.
upvoted 0 times
...
Maile
6 months ago
I think option A sounds like the best solution. Enabling TTL on the attribute seems simple and efficient.
upvoted 0 times
Lelia
6 months ago
I think option B could work too, creating two Lambda functions and using a DynamoDB stream for processing items.
upvoted 0 times
...
Martin
6 months ago
Yes, enabling TTL on the attribute and setting up a DynamoDB trigger with a Lambda function sounds like a simple solution.
upvoted 0 times
...
Carlee
6 months ago
I agree, option A seems like the most efficient choice.
upvoted 0 times
...
...
Juliana
7 months ago
Hmm, I'm not sure. All of these options have their pros and cons. I think I need to think about it a bit more before I commit to an answer. Anyone else struggling with this one?
upvoted 0 times
...
Margo
7 months ago
What, no option to just write a cron job to delete the expired items? That would be the least amount of code, right? *chuckles*
upvoted 0 times
...
Michell
7 months ago
I agree, option D does seem the most straightforward. Although, if you're not familiar with TTL or SQS, that could make it a bit more complex than it appears.
upvoted 0 times
...
Keena
7 months ago
I'm leaning towards option C. Using EventBridge to trigger the Lambda functions seems like a cleaner approach than using a DynamoDB stream. And we still get the benefit of the least amount of code to write.
upvoted 0 times
...
Lura
7 months ago
Hmm, I'm leaning towards option D. Enabling TTL and using an SQS dead-letter queue seems like the simplest approach. No need for all those Lambda functions and streams.
upvoted 0 times
Callie
7 months ago
Definitely, no need to overcomplicate things with multiple Lambda functions
upvoted 0 times
...
Shannon
7 months ago
Agreed, enabling TTL and using SQS seems like the most straightforward solution
upvoted 0 times
...
Virgie
7 months ago
Yeah, less code to write and maintain with option D
upvoted 0 times
...
Rebecka
7 months ago
That sounds like a good idea, keeping it simple with just the SQS dead-letter queue
upvoted 0 times
...
Chu
7 months ago
D) Enable TTL on the expirationDate attribute in the table Specify an Amazon Simple Queue Service (Amazon SQS) dead-letter queue as the target to delete the items Create an AWS Lambda function to process the items
upvoted 0 times
...
...
Huey
7 months ago
I'm not sure about this question. It seems to be asking for the least amount of code to write, but there are a lot of moving parts to consider here.
upvoted 0 times
...
Johanna
7 months ago
I'm not a big fan of option B. Creating two separate Lambda functions and using the DynamoDB stream seems overkill. We should aim for the simplest solution possible, and I think option A or C are better choices.
upvoted 0 times
...
Tamala
7 months ago
I agree with Dorthy, option A seems like the way to go. It's the simplest solution and it should get the job done without too much extra code. Plus, using a DynamoDB stream is a common pattern, so it's not too crazy.
upvoted 0 times
...
Lynna
7 months ago
Option A does sound like the easiest solution, but I'm not sure if I like the idea of using a DynamoDB stream. That adds an extra layer of complexity that we might not need. I'm curious to hear what the other candidates think.
upvoted 0 times
...
Dorthy
7 months ago
This is a tricky question. We need to find the solution that requires the least amount of code while still meeting the requirements. I'm leaning towards option A, as it seems the most straightforward - enabling TTL on the expirationDate attribute and using a Lambda function to process the deleted items.
upvoted 0 times
...

Save Cancel