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

已提問 2 年前檢視次數 441 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南