Can't trigger lambda's on SQS FIFO

前端 未结 3 432
南方客
南方客 2021-01-01 11:26

I am trying to trigger lambda execution to execute an item on a FIFO queue. Other than polling, what options do we have to accomplish that? We just learned that we cannot di

相关标签:
3条回答
  • 2021-01-01 11:43

    SQS event sourcing does not do anything than pulling queue every second with long polling.

    If you want everything in order; - Create a Cloudwatch event trigger for every second (as Asdfg suggested) - Set concurrency limit to 1 - Receive messages with long polling to reduce the cost

    0 讨论(0)
  • 2021-01-01 11:49

    For anyone that is interested AWS Now Supports Lambda Triggers from FIFO SQS as of yesterday. Thanks @JohnRotenstein for pointing that out.

    0 讨论(0)
  • 2021-01-01 12:04

    Your only option here is to poll the queue at certain intervals.

    You can create a CloudWatch event trigger that invokes a lambda function (lets say every 10 minutes) which polls the queue and does the processing.

    Update

    This is now possible. SQS FIFO queues can now be specified as an event source to your Lambda Function.

    https://aws.amazon.com/blogs/compute/new-for-aws-lambda-sqs-fifo-as-an-event-source/

    0 讨论(0)
提交回复
热议问题