阅读背景:

适用于一组文件的AWS Lambda事件

来源:互联网 

Is it possible to trigger a AWS Lambda function once a set of files has been uploaded to AWS S3. For example, if and only if file A, B, and C have been uploaded?

将一组文件上载到AWS S3后,是否可以触发AWS Lambda函数。例如,当且仅当文件A,B和C已上载?

1 个解决方案

#1


1  

Not that I've found, the only way I've found to do it is to send a notification file once the others are complete, so create A, B and C then create files.complete - I usually pass it the file names for the params.Body. You can then S3.listObjects on your bucket (the bucket name is passed in the event data) to get the names and iterate through that list to access them.

不是我发现的,我发现这样做的唯一方法是在其他人完成后发送通知文件,所以创建A,B和C然后创建files.complete - 我通常会传递文件名为params.Body。然后,您可以在存储桶上使用S3.listObjects(存储桶名称在事件数据中传递)以获取名称并迭代该列表以访问它们。


分享到: