gpt4 book ai didi

amazon-web-services - CloudFormation、Lambda、S3 - 访问被 s3 拒绝

转载 作者:行者123 更新时间:2023-12-03 23:56:54 25 4
gpt4 key购买 nike

所以我尝试运行此 cloudformation 脚本,但收到此错误:

  • Your access has been denied by S3, please make sure your request credentials have permission to GetObject for s3.XXXX.amazonaws.com/s3-bucket/folder-1/folder-2/code.zip. S3 Error Code: AccessDenied. S3 Error Message: Access Denied

我什至尝试过公开我的 code.zip!这不是我理想中想做的事......

这是我的代码:

"lambdafunction": {
"Type": "AWS::Lambda::Function",
"DependsOn": [
"other1",
"other2",
"other3"
],
"Properties": {
"Code": {
"S3Bucket": "s3.XXXX.amazonaws.com",
"S3Key": "s3-bucket/folder-1/folder-2/code.zip"
},
"Role": {
"Fn::GetAtt": [
"accessrole",
"Arn"
]
},
"Timeout": 60,
"Handler": "lambda_function.lambda_handler",
"Runtime": "python2.7",
"MemorySize": 1024
},
"Metadata": {
"AWS::CloudFormation::Designer": {
"id": "XXXX"
}
}
},

提前致谢!

最佳答案

所以事实证明代码部分是错误的,需要命名bucket url

 "Code": {
"S3Bucket": "s3-bucket",
"S3Key": "folder-1/folder-2/code.zip"
},

关于amazon-web-services - CloudFormation、Lambda、S3 - 访问被 s3 拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43981930/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com