AWS Certified Developer Associate DVA-C02 Practice Question
A developer is working on a serverless application where a certain AWS Lambda function is responsible for processing incoming messages from an Amazon SQS queue. Sometimes, this function encounters malformed messages that cannot be processed successfully. Which approach should the developer take to ensure that these problematic messages are segregated for troubleshooting without causing infinite processing retries?
Set the retry attempts configuration of the function to a minimum to prevent multiple processing attempts of the same message.
Revise the message handling code to be idempotent, thereby ignoring any message that has the same content as a previously processed message.
Capture exceptions within the code block and log error messages to a monitoring service without storing the problematic messages.
Designate a dedicated queue to serve as a destination for messages that fail to be processed by the function.
To handle failed message processing, the developer should configure a dead-letter queue (DLQ) to collect messages that the Lambda function fails to process after the defined number of retries. This queue provides a separate storage area for failed messages, making it easier to troubleshoot and resolve issues without overwhelming the system with repeated retries. A dead-letter queue also helps to prevent potential data loss by preserving messages that might otherwise be discarded. Other options provided might address aspects of error handling but do not offer a way to store the faulty messages for later analysis. For example, designing for idempotent operations does not help with messages that are inherently malformed; it only prevents the same message from creating duplicate effects if processed multiple times.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a Dead-Letter Queue (DLQ) in AWS?
Open an interactive chat with Bash
How can a developer configure an AWS Lambda function to use a Dead-Letter Queue?
Open an interactive chat with Bash
What types of troubleshooting data can be gathered from messages in a DLQ?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Development with AWS Services
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .