我在 aws 中创建了一个 s3 存储桶并添加了正确的权限和用户组等。我添加了以下策略:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObjectAcl",
"s3:GetObject",
"s3:ListAllMyBuckets",
"s3:ListBucket",
"s3:DeleteObject",
"s3:GetBucketLocation",
"s3:PutObjectAcl"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::bucketname"
}
]
}
我使用传输 ftp 客户端通过 ftp 将资产从本地文件夹上传到存储桶,这很好。然后,我将存储桶设置为工艺 cms 作为资产来源。我可以通过 cms 将文件上传到 s3,没有任何问题,并且可以正常查看图像,但是当我尝试访问通过 ftp 上传的前端图像时,我收到拒绝访问错误 403:
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>96E15AB155C47209</RequestId>
<HostId>
our-hist-id-here
</HostId>
</Error>
这是一个政策问题吗?
谢谢