Enable failed batch item reporting on the Lambda function and add an SQS dead-letter queue
Short answer
D Enable failed batch item reporting on the Lambda function and add an SQS dead-letter queue to isolate invalid messages.
Question
Key Takeaways
The root cause is the batch failure pattern, not insufficient capacity: with ReportBatchItemFailures enabled, Lambda returns only the messages that actually failed instead of the whole batch, so valid messages are not reprocessed or blocked (D). A dead-letter queue then isolates the permanently invalid messages after the retry limit. Increasing the batch size (A, C) would worsen the problem because a single bad message would fail more messages per batch, and switching to a FIFO queue (A) would reduce throughput and add deduplication overhead rather than solve the failure pattern.
Because one invalid message causes an entire batch of ten to fail and return to the queue, the invalid messages are repeatedly retried and block valid messages in the same batch, which is the classic snowball effect. Keeping the batch size unchanged, configuring the Lambda function to report failed batch items so only the unprocessed messages are returned to the queue, and adding a dead-letter queue moves the poison messages aside after the retry limit so that valid messages continue to be processed within their required timeline.
Common mistake: Increasing the batch size (A and C)—hk0308 correctly notes that the data shows valid and invalid messages are mixed in the same batch, so a larger batch means one bad message fails and re-delivers more good messages, making the backlog worse. Switching from a standard queue to a FIFO queue (A)—VerRi explained the snowball anti-pattern: one failure in a batch fails the whole batch, blocking other tasks; FIFO also adds deduplication and ordering overhead that reduces throughput rather than meeting the timeline.
Expert Analysis
Why the Answer Is Correct
The logs show the queue contains messages with invalid data, and the function processes them in batches of ten. By default, when a batch fails the entire batch is returned to the queue, so a single malformed message repeatedly fails the nine valid messages batched with it, and the queue grows faster than it drains. Enabling ReportBatchItemFailures on the Lambda function makes the invocation return only the messages that actually failed, so valid messages in the same batch are processed normally and stay within their timeline. Configuring a dead-letter queue then moves messages that keep failing past the retry limit out of the queue so they stop consuming processing capacity. Together these address the failure pattern directly while leaving the batch size unchanged.
Why the Other Options Are Wrong
A increases the batch size and switches the queue to FIFO. FIFO adds deduplication and ordering overhead that reduces throughput, and the problem is not ordering; a larger batch also means a single invalid message fails and re-delivers more valid messages, worsening the backlog. B reduces the batch size and requests throughput and concurrency increases, which treats the symptom as a capacity problem even though the evidence shows invalid data is the cause, so the added capacity is consumed by repeatedly retrying poison messages. C increases the batch size and adds S3 Transfer Acceleration, which is unrelated to SQS processing, and adds a dead-letter queue but leaves the whole-batch failure behavior in place. D is correct.
Community Comment Notes
Community voted D (93). c3518fc linked the AWS guidance on avoiding the snowball anti-pattern in serverless architectures, which prescribes partial batch failure responses plus a dead-letter queue. hk0308 and VerRi both argued against the batch-size-increasing options because mixing valid and invalid messages in a batch means a larger batch fails more good messages.
Official Reference
https://docs.aws.amazon.com/lambda/latest/dg/services-sqs-errorhandling.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 8 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 8
-
c3518fc 👍 5 Answered DConfigure a dead-letter queue to avoid creating a snowball anti-pattern in your serverless application’s architecture. For more information, see the Avoiding snowball anti-patterns section of this guide. Configure your Lambda function event source mapping to make only the failed messages visible. To do this, you must include the value ReportBatchItemFailures in the FunctionResponseTypes list when configuring your event source mapping. https://docs.aws.amazon.com/prescriptive-guidance/latest/lambda-event-filtering-partial-batch-responses-for-sqs/best-practices-partial-batch-responses.html
-
WhyIronMan 👍 4 Answered DD, https://docs.aws.amazon.com/prescriptive-guidance/latest/lambda-event-filtering-partial-batch-responses-for-sqs/best-practices-partial-batch-responses.html
-
VerRi 👍 2 Answered DA. 1 failure within a batch will cause all messages in that batch to fail, blocking other tasks and delaying overall processing
-
dkp 👍 2answer D seems more approprite
-
hk0308 👍 1 Answered CWe have to increase the batch size to speed up the processing. D makes no sense since it will not speed up the processing in anyway. A cannot be right since it used FIFO queue which will reduce lambda concurrency.
Show 3 more comments
-
Ola2234 👍 1I am torn between option A or D
-
ogerber 👍 2its D, 100%
-
seetpt 👍 2 Answered DD for me
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →