DEV Community

Discussion on: Error handling in AWS Lambda triggered by SQS events

Collapse
 
piczmar_0 profile image
Marcin Piczkowski

Hi, not sure I got you right. Are you refering to lambda processing a batch of messages from sqs queue? In this case when Lambda fails the whole batch of messages gets back to the queue. Sure, you can catch the exception and continue to process the remaining messages from the batch, then handle the failing messages at the end and removing the successful ones from the queue. This should work. It's a good question. I should have mentioned about such use case too.