Linking Simple Images results in XML Error

0

I created a bucket to house several images, which I want to be able to link directly to. On the bucket's permissions, I have "Block All Public Access" set to off. However, when I click on the URL, I get an XML error as follows:

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>

<RequestId>SCM9EEHJ0J2PWP8V</RequestId>

<HostId>Pe+RyRWQCkOuGb5Nvt6eBzSGyPOKn/q8CovuK0Z70Ocg2NVfSYttDXNm4ngHzKfHDx7XLAnhRrQ=</HostId>

</Error>

I tried researching the issue, but all I found were confusing examples of bucket access JSON code. I am not a coder, I am just trying to link an image.

已提问 2 年前519 查看次数
1 回答
0

Disabling Block Public Access (BPS) doesn't make buckets or objects automatically public, but it means you are able to. (That is, having it enabled means that even if you try to make something public, you can't.) You will need to grant public read permissions on the object in order for it to be public. Note that of the methods on that page, I'd recommend using a Bucket Policy rather than modifying the ACL.

Without knowing your exact use case, I'd also recommend having a particular Bucket to use only for public objects, which you will disable BPA on. Other Buckets in your account should have BPA enabled still, to make it obvious if your object(s) could be public or not from the Bucket they're in.

You may also want to look at using CloudFront to serve objects from S3, which avoids the need to make the objects public or disable BPA.

profile pictureAWS
专家
James_S
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则