有没有办法让多个S3存储桶触发Lambda函数? [英] Is there a way for a Lambda function to be triggered by multiple S3 buckets?

查看:76
本文介绍了有没有办法让多个S3存储桶触发Lambda函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个Lambda函数,该函数将由对S3控制台中的任何存储桶进行的任何更改触发.有没有办法将S3中每个存储桶中的所有创建事件都绑定到我的Lambda函数?

I'm trying to create a Lambda function that will be triggered by any change made to any bucket in the S3 console. Is there a way to tie all create events from every bucket in S3 to my Lambda function?

似乎在创建Lambda函数时,您只能选择一个S3存储桶.如果不是在Lambda控制台中,是否可以通过编程方式执行此操作?

It appears that in the creation of a Lambda function, you can only select one S3 bucket. Is there a way to do this programmatically, if not in the Lambda console?

推荐答案

至少有一种方法:您可以为要监视的每个存储桶设置s3事件通知,所有这些通知都指向一个SQS队列.

There is at least one way: you can setup an s3 event notifications, for each bucket you want to monitor, all pointing to a single SQS queue.

然后,该SQS队列可以成为lambda函数的事件源.

That SQS queue can then be the event source for your lambda function.

这篇关于有没有办法让多个S3存储桶触发Lambda函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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