AWS Lambda 可以访问其他区域的 S3 存储桶吗? [英] Can AWS Lambda access S3 buckets from other regions?

查看:24
本文介绍了AWS Lambda 可以访问其他区域的 S3 存储桶吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前尝试使用 AWS Lambda.lambda 函数应从 S3 存储桶加载 zip 文件(> 10 MB).S3 存储桶位于 eu-central-1,而 lambda 函数位于 lambda:us-east-1.

I currently try to use AWS Lambda. The lambda function should load the zip file (> 10 MB) from an S3 Bucket. The S3 bucket is located in eu-central-1 while the lambda function is in lambda:us-east-1.

当我尝试保存 lambda 函数时,我得到:

When I try to save the lambda function, I get:

GetObject 时发生错误.S3 错误代码:AuthorizationHeaderMalformed.S3 错误消息:授权头格式错误;'us-east-1' 区域是错误的;期待'eu-central-1'

Error occurred while GetObject. S3 Error Code: AuthorizationHeaderMalformed. S3 Error Message: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-central-1'

这真的是问题吗?是否可以移动 lambda 函数?

Is that really the problem? Is it possible to move the lambda function?

执行 Lambda 函数的 IAM 角色具有 AmazonS3FullAccess 策略.

The IAM role which executes the Lambda function has the AmazonS3FullAccess policy.

推荐答案

lambda 函数必须与您在S3 链接 URL*"中指定的 S3 存储桶位于同一区域:

The lambda function has to be in the same region as the S3 bucket you specify at "S3 link URL*":

这篇关于AWS Lambda 可以访问其他区域的 S3 存储桶吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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