Batch meter-reading events arrive on Amazon SQS. A Lambda function should process messages in batches and report which messages failed so successful ones are not reprocessed. What should the developer enable?
Select an answer to reveal the explanation.
Short Explanation
SQS can hand Lambda a handful of meter events at once—great for throughput—but one bad message should not force the good ones to replay. Partial batch failure reporting tells SQS exactly which items failed. Blowing away the queue or forcing batch size one throws away that design.
Full Explanation
An SQS event source mapping can deliver messages in batches to Lambda. With ReportBatchItemFailures (partial batch failure reporting), the function returns the identifiers of failed messages so SQS redrives only those items. Disabling the mapping for EC2 polling, wiping the queue on error, or abandoning batching for SNS fanout are not the intended SQS-to-Lambda pattern for this requirement.