Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Your retry logic is correct and does nothing

Description and use

Detecting mismatches between Lambda handlers and event source mapping settings prevents duplicate message processing and ensures idempotency.

Problem

A Lambda batch consumer correctly builds a partial batch failure response, but the event source mapping does not enable reporting, causing all messages to be retried and leading to duplicate processing.

Outcome

Detection of partial batch response mismatches prevents duplicate message processing and ensures idempotent handling.

Workflow

  • 1. Lambda receives SQS batch. 2. Handler processes each record, collecting failures into batchItemFailures. 3. Handler returns batchItemFailures. 4. Event source mapping checks FunctionResponseTypes. 5. If ReportBatchItemFailures is missing, Lambda discards failures and retries all messages. 6. Infrawise scans code for batchItemFailures and mapping for reportsBatchItemFailures. 7. If mismatch found, Infrawise reports high severity. 8. Fix by enabling ReportBatchItemFailures in mapping or making handler idempotent.

Evidence

The whole batch is marked failed. All ten records are redelivered, including the nine that already ran to completion.

Source

MissingPartialBatchResponseAnalyzer looks for an sqs trigger with a batch size above 1 and no ReportBatchItemFailures.

Source

  • Record date: 2026-09-08T06:46:17.988Z