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 a message 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?

  • Revise the message handling code to be idempotent, thereby ignoring any message that has the same content as a previously processed message.

  • Designate a dedicated queue to serve as a destination for messages that fail to be processed by the function.

  • Allocate more computational resources to the function to reduce the chances of a message being malformed due to resource constraints.

  • Adjust the message visibility setting in the queue to delay reprocessing attempts beyond the time frame the function requires to complete its execution.

  • Set the retry attempts configuration of the function to a minimum to prevent multiple processing attempts of the same message.

  • Capture exceptions within the code block and log error messages to a monitoring service without storing the problematic messages.

AWS Certified Developer Associate DVA-C02
Development with AWS Services
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot