以下是我的bucket政策:
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::spmgr/*"
},
{
"Sid": "AllowEBSService",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::823510892997:role/service-role/aws-elasticbeanstalk-service-role"
},
"Action": "*",
"Resource": [
"arn:aws:s3:::spmgr",
"arn:aws:s3:::spmgr/*"
]
}
]
}
在尝试从我的弹性beanstalk工作示例上传文件时,我收到Access denied错误。(不过请注意,我的本地开发机器上的相同代码能够成功上传文件)那么我该如何修复它呢?
1条答案
按热度按时间ep6jt1vc1#
aws-elasticbeanstalk-service-role
用于EB服务本身。对于您的应用程序,您必须提供与Elastic Beanstalk instance profile关联的角色。您必须检查您的EB示例正在使用什么角色。