Skip to main content

DVA-C02 practice question · Troubleshooting and Optimization

A Lambda function that processes messages from an SQS queue in batches fails when just one message in a batch of 10 is…

A Lambda function that processes messages from an SQS queue in batches fails when just one message in a batch of 10 is malformed, causing the entire batch (including the 9 valid messages) to be retried repeatedly. What feature lets the function report only the specific failed message(s) so the valid ones aren't needlessly reprocessed?

  • APartial batch response (reportBatchItemFailures) on the SQS event source mapping
  • BIncreasing the queue's visibility timeout to a very large value
  • CReducing the batch size to 1 for every queue permanently
  • DDisabling the DLQ redrive policy
Show the answer and explanation

Correct answer: A) Partial batch response (reportBatchItemFailures) on the SQS event source mapping

Why each option is right or wrong

  • A) Correct. Enabling partial batch response lets the function return which specific message IDs in the batch failed; only those are made visible again for retry, while the successfully processed messages in the same batch are correctly removed from the queue instead of being needlessly reprocessed.
  • B) Incorrect. A longer visibility timeout gives more time per attempt but doesn't solve the specific problem of one bad message forcing the whole batch, including valid messages, to be retried.
  • C) Incorrect. While a batch size of 1 would avoid the co-mingling problem, it sacrifices the throughput and cost benefits of batch processing entirely; partial batch response solves the underlying issue while still allowing larger batches.
  • D) Incorrect. Disabling the DLQ doesn't address the batch-level failure behavior; it would just remove the safety net for messages that fail persistently.
Exam domain
Troubleshooting and Optimization · 18% of DVA-C02
Question type
Multiple choice (one answer)

Practise the full DVA-C02 exam

This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.

Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.