# AWS SQS / Lamdba - Processing messages

**URL:** <https://forum.serverless.com/t/aws-sqs-lamdba-processing-messages/9291>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [September 10, 2019, 9:35pm UTC](https://forum.serverless.com/t/aws-sqs-lamdba-processing-messages/9291 "2019-09-10T21:35:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imthatcarlos](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/imthatcarlos/32/3603_2.png) [@imthatcarlos](https://forum.serverless.com/u/imthatcarlos)\
**Post date:** [September 10, 2019, 9:35pm UTC](https://forum.serverless.com/t/aws-sqs-lamdba-processing-messages/9291/1 "2019-09-10T21:35:41Z")

</div>

So I set a function event for `sqs` as described here: [https://serverless.com/framework/docs/providers/aws/events/sqs/](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

---

<div class="post-metadata">

**Author:** ![barendb](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/barendb/32/3473_2.png) [@barendb](https://forum.serverless.com/u/barendb)\
**Post date:** [September 23, 2019, 10:33pm UTC](https://forum.serverless.com/t/aws-sqs-lamdba-processing-messages/9291/2 "2019-09-23T22:33:15Z")

</div>

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)
