0

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

3

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/

  • 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 Jul 8 '18 at 16:31
  • Implementing an SQS poller + Lambda invoker on EC2. – Michael - sqlbot Jul 8 '18 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.