How To Detect BatchItemFailure support from Lambda SQS Event

0

Hi Everyone,

When processing an SQS event with AWS Lambda, I want to know if the lambda function I am running (or the event source mapping more accurately) supports batch item failures. Is there a way to know from the SQS event?

Knowing this would let my Lambda function return a response that is appropriate for the event source mapping.

Until now I was running with an event source mapping that did not have batch item failures enabled (by mistake) and lost many messages as a result :-(

Thanks, Mo

1回答
0

No. The event object does not contain any specific information to let you know if the event source mapping supports partial failure response or not. You will need either to make sure you configure your event sources correctly :) or call the get_event_source_mapping API, which I do not recommend as it will probably throttle and will add latency.

profile pictureAWS
エキスパート
Uri
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ