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

Your retry logic is correct and does nothing

说明与用途

检测 Lambda 处理程序与事件源映射设置之间的不匹配可防止消息重复处理并确保幂等性。

问题

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.

结果

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

工作流

  • 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.

证据

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

来源

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

来源

  • 记录日期: 2026-09-08T06:46:17.988Z