Deal of The Day! 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

Posted by Gail on Mar 05, 2025 at 01:41 AM

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?

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

Get Premium DVA-C02 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
33 comments · newest first
KE
Kenny 11 months ago
Not sure if just creating a new queue is enough. What if the errors keep happening?
GI
Giuseppe 11 months ago
B is the way to go! It keeps things organized for later analysis.
OR
Oren 11 months ago
Surprised that FIFO queues are even mentioned here. They don't help with errors!
ME
Melissa 11 months ago
I think A could work too, but it doesn't really solve the problem.
LE
Lemuel 12 months ago
Option B is definitely the best choice here. Dead-letter queues are super useful!
RO
Roselle 12 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.
IN
In 1 year 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.
WI
Winifred 1 year 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.
KR
Kristeen 1 year 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.
VA
Valentine 1 year 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.
LI
Lili 1 year 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.
EL
Elfriede 1 year 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.
ME
Merlyn 1 year 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.
CA
Cassie 2 years ago
Hold up, did someone say FIFO queue? I'm not touching that with a 10-foot pole! That's just asking for trouble.
KA
Karrie 2 years ago
↳ replying to Cassie
Yeah, using CloudWatch Logs to save error messages separately sounds like a good solution too.
LO
Lorriane 2 years ago
↳ replying to Cassie
I think setting up a dead-letter queue with Maximum Receives configured might be a better option.
PE
Peggie 2 years ago
↳ replying to Cassie
I agree, FIFO queues can be tricky to work with.
KE
Kenny 2 years 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.
SH
Shaunna 2 years 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.
HE
Helga 2 years ago
↳ replying to Shaunna
Let's go with option B then, it's the simplest and most effective solution.
AB
Abraham 2 years ago
↳ replying to Shaunna
I agree, setting up a dead-letter queue seems like the most efficient solution.
TE
Terrilyn 2 years ago
↳ replying to Shaunna
I think option B is the best choice here.
TY
Ty 2 years 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.
ET
Ettie 2 years 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.
AS
Ashley 2 years ago
↳ replying to Ettie
It's definitely the most operationally efficient solution for our application.
TH
Thora 2 years ago
↳ replying to Ettie
We can then review and retry the messages later without affecting the main processing flow.
BA
Barney 2 years ago
↳ replying to Ettie
I agree, sending the failed messages to a dead-letter queue is a good way to prevent the main queue from getting blocked.
CA
Cassandra 2 years ago
↳ replying to Ettie
I think option B is the best solution. It allows us to save the error messages for further analysis.
ME
Melinda 2 years ago
I disagree, I believe option D is more efficient as it notifies administrator users immediately.
MA
Marvel 2 years ago
I think option B is the best solution because it allows us to save the error messages for further analysis.
AN
Annelle 2 years ago
Option B seems like the way to go. Creating a dead-letter queue is a solid approach to handling those problematic messages.
TA
Tamra 2 years ago
↳ replying to Annelle
Definitely, it will help prevent the main queue from getting blocked.
AN
Andra 2 years ago
↳ replying to Annelle
I agree, setting up a dead-letter queue is a good way to handle those errors.
0/2000 characters

Save Cancel