<p>An SQS queue can now be wired directly to a Lambda function as an event source, so you don't have to start the Lambda function on a schedule.</p>

<p><a href="https://aws.amazon.com/blogs/aws/aws-lambda-adds-amazon-simple-queue-service-to-supported-event-sources/" rel="nofollow noreferrer">https://aws.amazon.com/blogs/aws/aws-lambda-adds-amazon-simple-queue-service-to-supported-event-sources/</a></p>

CC BY-SA 4.0
2018-07-08T16:31:01.997Z
Thanks Michael, this is perfect for me. I see this is a very recently added feature for AWS, so what would be the solution in the past for achieving this?
Simian
CC BY-SA 4.0
2018-07-08T21:44:43.903Z
Implementing an SQS poller + Lambda invoker on EC2.
Michael - sqlbot
CC BY-SA 4.0
2018-07-07T18:45:48.893Z
2018-07-07T18:45:48.893Z
Michael - sqlbot
<p>What are some strategies and patterns for processing message queues quickly?</p>

<p>I have a Lambda function that is invoked on a schedule every x minutes to process a number of messages in the queue. I could reduce the interval, but a lot of the time there won’t be any messages to process and as Lambda is priced per request this would be cost inefficient. So I’m looking for a few ideas on other ways to achieve this</p>

<amazon-web-services><aws-lambda><amazon-sqs>
Processing message queues quickly without wasting money on AWS Lambda
Simian
# Processing message queues quickly without wasting money on AWS Lambda

(Asked by: username_0 on 2018-07-07)

What are some strategies and patterns for processing message queues quickly?

I have a Lambda function that is invoked on a schedule every x minutes to process a number of messages in the queue. I could reduce the interval, but a lot of the time there won’t be any messages to process and as Lambda is priced per request this would be cost inefficient. So I’m looking for a few ideas on other ways to achieve this

**Tags:** amazon-web-services, aws-lambda, amazon-sqs


---

## 1 answers

### Answer by username_1 on 2018-07-07. Score: 3 | Accepted answer

An SQS queue can now be wired directly to a Lambda function as an event source, so you don't have to start the Lambda function on a schedule.

<https://aws.amazon.com/blogs/aws/aws-lambda-adds-amazon-simple-queue-service-to-supported-event-sources/>

> **Comments:**
> **username_0**: Thanks Michael, this is perfect for me. I see this is a very recently added feature for AWS, so what would be the solution in the past for achieving this?  
> **username_1**: Implementing an SQS poller + Lambda invoker on EC2.  

---

