无法在 SQS FIFO 上触发 lambda [英] Can't trigger lambda's on SQS FIFO

查看:25
本文介绍了无法在 SQS FIFO 上触发 lambda的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试触发 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.

在亚马逊发布更新之前,有没有人找到解决这个问题的方法?

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 事件触发器,它调用一个 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆