AWS SQS / Lamdba - Processing messages

So I set a function event for sqs as described here: https://serverless.com/framework/docs/providers/aws/events/sqs/

Is the handler supposed to delete the message from the SQS queue? Or is that handled by the framework?

Also - what does the handler event object look like when it was invoked this way?

Cheers

If the lambda succeeds the message is deleted. If it fails, it would go back onto the queue.

You don’t need to manage the queue from the lambda. It’s not done by Serverless but rather by the SQS -> Lambda triggered setup in AWS.

Be aware that your SQS message timeout needs to be larger than the timeout of your lambda. Reason being is if your SQS message is picked up by a Lambda and the timeout is 30s, and the Lambda runs longer than 30s the message will go back onto the queue and might get picked up by another lambda (Might = Lambda concurrency != 1)