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 年前442 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则