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 réponse
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
EXPERT
Uri
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions