Free 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?

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

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

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

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

  • 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.

This question's topic:
AWS Certified Developer Associate DVA-C02 / 
Development with AWS Services
Your Score:

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