配置Amazon s3存储桶以运行在另一个帐户中创建的Lambda函数
是否可以将S3存储桶配置为运行在其他帐户中创建的Lambda函数?基本上,我想要完成的是将新项目添加到S3存储桶中时,我想在另一个帐户中运行Lambda函数
Is it possible to configure S3 bucket to run a Lambda function created in a different account? Basically what I'm trying to accomplish is that when new items are added to S3 bucket I want to run a lambda function in another account
您可以通过向S3存储桶提供完整的Lambda函数ARN来做到这一点.例如,在AWS控制台中的存储桶设置内:
You can do this by providing the full Lambda Function ARN to your S3 bucket. For example inside your bucket settings in the AWS Console:
本文将帮助您为跨帐户调用配置正确的IAM.另请参阅 AWS Lambda权限模型一个>.请注意,据我所知,bucket和Lambda函数必须位于同一区域!
This article will help you configure the correct IAM for cross account invocation. Also take a look at the AWS Lambda Permissions Model. Note that as far as I know the bucket and the Lambda function have to be in the same region!