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