How does Lambda process SQS messages?
IntermediateConceptServerless & Messaging (Step Functions, EventBridge, SQS, SNS)
Answer
Lambda uses an event source mapping that polls the queue and invokes your function with batches of messages. If the function fails, the batch becomes visible again after the visibility timeout. Enable ReportBatchItemFailures so only failed messages are retried, not the whole batch.