New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon DVA-C02 Exam - Topic 1 Question 47 Discussion

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

A company created an application to consume and process dat

a. The application uses Amazon SQS and AWS Lambda functions. The application is currently working as expected, but it occasionally receives several messages that it cannot process properly. The company needs to clear these messages to prevent the queue from becoming blocked. A developer must implement a solution that makes queue processing always operational. The solution must give the company the ability to defer the messages with errors and save these messages for further analysis. What is the MOST operationally efficient solution that meets these requirements?

Show Suggested Answer Hide Answer
Suggested Answer: B

Using a dead-letter queue (DLQ) with Amazon SQS is the most operationally efficient solution for handling unprocessable messages.

Amazon SQS Dead-Letter Queue:

A DLQ is used to capture messages that fail processing after a specified number of attempts.

Allows the application to continue processing other messages without being blocked.

Messages in the DLQ can be analyzed later for debugging and resolution.

Why DLQ is the Best Option:

Operational Efficiency: Automatically defers messages with errors, ensuring the queue is not blocked.

Analysis Ready: Messages in the DLQ can be inspected to identify recurring issues.

Scalable: Works seamlessly with Lambda and SQS at scale.

Why Not Other Options:

Option A: Logs the messages but does not resolve the queue blockage issue.

Option C: FIFO queues and 0-second retention do not provide error handling or analysis capabilities.

Option D: Alerts administrators but does not handle or store the unprocessable messages.

Steps to Implement:

Create a new SQS queue to serve as the DLQ.

Attach the DLQ to the primary queue and configure the Maximum Receives setting.


Using Amazon SQS Dead-Letter Queues

Best Practices for Using Amazon SQS with AWS Lambda

Contribute your Thoughts:

0/2000 characters
Kenny
3 months ago
Not sure if just creating a new queue is enough. What if the errors keep happening?
upvoted 0 times
...
Giuseppe
3 months ago
B is the way to go! It keeps things organized for later analysis.
upvoted 0 times
...
Oren
3 months ago
Surprised that FIFO queues are even mentioned here. They don't help with errors!
upvoted 0 times
...
Melissa
4 months ago
I think A could work too, but it doesn't really solve the problem.
upvoted 0 times
...
Lemuel
4 months ago
Option B is definitely the best choice here. Dead-letter queues are super useful!
upvoted 0 times
...
Roselle
4 months ago
I thought about using CloudWatch for monitoring errors, but I don't think just logging them would help with processing. I feel like we need a more proactive approach.
upvoted 0 times
...
In
4 months ago
I practiced a similar question where we had to handle message failures. I think using a dead-letter queue was the answer there too, so B might be the way to go.
upvoted 0 times
...
Winifred
5 months ago
I'm not entirely sure, but I feel like changing the queue to FIFO isn't the best solution here. It seems more about order than error handling.
upvoted 0 times
...
Kristeen
5 months ago
I remember studying about dead-letter queues in SQS. I think option B sounds right because it allows for deferring messages that can't be processed.
upvoted 0 times
...
Valentine
5 months ago
This seems straightforward enough. I'm pretty confident that option B is the best solution here, as it allows us to create a dead-letter queue to handle the problematic messages.
upvoted 0 times
...
Lili
5 months ago
Okay, I think I've got a good handle on this. The key is finding a way to defer the messages with errors and save them for further analysis, while keeping the queue processing operational. I'm leaning towards option B.
upvoted 0 times
...
Elfriede
5 months ago
Hmm, I'm a bit confused by the question. I'll need to read through it a few times to make sure I understand all the details before attempting to answer.
upvoted 0 times
...
Merlyn
5 months ago
This looks like a tricky one. I'll need to carefully consider the requirements and the different options to find the most operationally efficient solution.
upvoted 0 times
...
Cassie
11 months ago
Hold up, did someone say FIFO queue? I'm not touching that with a 10-foot pole! That's just asking for trouble.
upvoted 0 times
Karrie
10 months ago
Yeah, using CloudWatch Logs to save error messages separately sounds like a good solution too.
upvoted 0 times
...
Lorriane
11 months ago
I think setting up a dead-letter queue with Maximum Receives configured might be a better option.
upvoted 0 times
...
Peggie
11 months ago
I agree, FIFO queues can be tricky to work with.
upvoted 0 times
...
...
Kenny
12 months ago
I see your point, Melinda. But I think option A is also a good choice as it saves error messages to a separate log stream for easy access.
upvoted 0 times
...
Shaunna
12 months ago
Option D could work, but setting up the CloudWatch alarm and SNS notifications might be overkill for this particular scenario. B is the simplest and most effective solution.
upvoted 0 times
Helga
11 months ago
Let's go with option B then, it's the simplest and most effective solution.
upvoted 0 times
...
Abraham
11 months ago
I agree, setting up a dead-letter queue seems like the most efficient solution.
upvoted 0 times
...
Terrilyn
11 months ago
I think option B is the best choice here.
upvoted 0 times
...
...
Ty
12 months ago
Hmm, I'm not sure about option C. Reducing the message retention period to 0 seconds doesn't sound like a good idea. We need to hold onto those failed messages for further analysis.
upvoted 0 times
...
Ettie
12 months ago
I agree with Annelle. Sending the failed messages to a dead-letter queue gives us the ability to review and retry them later. Seems like the most efficient solution.
upvoted 0 times
Ashley
11 months ago
It's definitely the most operationally efficient solution for our application.
upvoted 0 times
...
Thora
11 months ago
We can then review and retry the messages later without affecting the main processing flow.
upvoted 0 times
...
Barney
11 months ago
I agree, sending the failed messages to a dead-letter queue is a good way to prevent the main queue from getting blocked.
upvoted 0 times
...
Cassandra
11 months ago
I think option B is the best solution. It allows us to save the error messages for further analysis.
upvoted 0 times
...
...
Melinda
12 months ago
I disagree, I believe option D is more efficient as it notifies administrator users immediately.
upvoted 0 times
...
Marvel
12 months ago
I think option B is the best solution because it allows us to save the error messages for further analysis.
upvoted 0 times
...
Annelle
1 year ago
Option B seems like the way to go. Creating a dead-letter queue is a solid approach to handling those problematic messages.
upvoted 0 times
Tamra
11 months ago
Definitely, it will help prevent the main queue from getting blocked.
upvoted 0 times
...
Andra
12 months ago
I agree, setting up a dead-letter queue is a good way to handle those errors.
upvoted 0 times
...
...

Save Cancel