A Lambda function processes messages from an Amazon SQS standard queue (batch size 10) and writes results to S3. On day one, message arrival outpaces processing and many queued messages contain invalid data, causing valid messages to miss required processing deadlines. Which change will ensure valid messages meet their timeline?
Choose an answer
Tap an option to check your answer.
Correct answer: Keep the Lambda batch size unchanged. Configure the Lambda function to report failed batch items so individual failed messages are returned to the queue. Configure an SQS dead-letter queue for failed messages..
Why this is the answer
The core problem is that invalid messages are causing processing delays for valid ones. By configuring the Lambda function to report failed batch items, only the problematic messages are returned to the queue, allowing valid messages in the same batch to be processed successfully. A Dead-Letter Queue (DLQ) then captures these repeatedly failing messages, preventing them from endlessly blocking the queue and providing a mechanism for later analysis or reprocessing. Increasing the batch size (option 1 and 3) would exacerbate the problem by processing more invalid messages at once. Converting to FIFO (option 1) is unnecessary for this problem and can reduce throughput. Increasing SQS throughput or Lambda concurrency (option 1 and 2) won't solve the underlying issue of invalid messages blocking processing. S3 Transfer Acceleration (option 3) is irrelevant to the SQS/Lambda processing bottleneck.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed