A solution uses Amazon SQS standard queues, an AWS Lambda function, and a DynamoDB table. The Lambda function is triggered by SQS and writes items to DynamoDB. The design should maximize Lambda scalability and ensure that messages that Lambda successfully processes are not processed again. Which configuration satisfies these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Include ReportBatchItemFailures in the FunctionResponseTypes for the Lambda event source mapping..
Why this is the answer
Including ReportBatchItemFailures in the FunctionResponseTypes for the Lambda event source mapping allows Lambda to partially succeed a batch of SQS messages. If some messages fail processing within a batch, Lambda can report only those specific message IDs back to SQS. SQS then retains only the failed messages, making them visible again for reprocessing, while successfully processed messages are deleted. This prevents reprocessing of successfully handled messages and maximizes Lambda scalability by not requiring the entire batch to be reprocessed if only a few items fail. Setting the batch window to 1 second or batch size to 1 would reduce throughput and scalability, as Lambda would process fewer messages concurrently or individually. Adjusting the SQS visibility timeout is important for preventing messages from becoming visible again prematurely during processing, but it doesn't directly address the requirement of preventing reprocessing of successfully processed messages within a batch.
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