问题描述
我试图触发lambda执行以执行FIFO队列中的项目.除了轮询之外,我们还需要采取哪些其他选择?我们刚刚了解到,我们无法直接从FIFO队列中触发lambda执行,目前只有标准队列支持这种情况.我还了解到,我们无法将SNS主题预订到FIFO队列-仅标准队列也支持该队列.
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 directly trigger a lambda execution from a FIFO queue, which is only supported from the standard queue at this time.I also learned that we cannot subscribe an SNS topic to a FIFO queue – which is only supported on the standard queue as well.
在Amazon发布更新之前,有没有人找到解决方法?
Has anybody found a work around for this yet until Amazon releases an update?
推荐答案
您唯一的选择是按一定的时间间隔轮询队列.
Your only option here is to poll the queue at certain intervals.
您可以创建一个CloudWatch event trigger
,该CloudWatch event trigger
调用一个lambda
函数(每10分钟说一次),该函数轮询队列并进行处理.
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.
现在这是可能的.现在可以将SQS FIFO队列指定为Lambda函数的事件源.
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/
这篇关于无法触发SQS FIFO上的lambda的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!