Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2018-07-08T16:31:01.997Z
Answers: 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?
Answers: Simian
Answers: CC BY-SA 4.0
Answers: 2018-07-08T21:44:43.903Z
Answers: Implementing an SQS poller + Lambda invoker on EC2.
Answers: Michael - sqlbot
Answers: CC BY-SA 4.0
Answers: 2018-07-07T18:45:48.893Z
Answers: 2018-07-07T18:45:48.893Z
Answers: Michael - sqlbot
Body: <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>
  
Tags: <amazon-web-services><aws-lambda><amazon-sqs>
Title: Processing message queues quickly without wasting money on AWS Lambda
UserDisplayName: Simian
ThreadText: # 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 username_1, 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.  
  
  ---
  
  