【发布时间】:2022-01-11 22:14:30
【问题描述】:
我第一次使用 cloudfront + s3 时遇到了一个小问题。我只想通过云端访问我的图像。在 S3 上,我已阻止所有公共访问。 Cloudfront 源设置为 S3 存储桶。
问题是当我现在尝试通过云端域名访问我的图像时。
XXX.cloudfront.net/folder/image.jpg
我得到了错误
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
但是,如果我在 s3 存储桶上设置公共访问权限
Block public and cross-account access to buckets and objects through any public bucket or access point policies
S3 will ignore public and cross-account access for buckets or access points with policies that grant public access to buckets and objects.
然后我可以从云端链接查看图像。是否可以在没有公共访问权限的情况下查看云端图像?
【问题讨论】:
标签: amazon-web-services amazon-s3 amazon-cloudfront