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.

asked 2 years ago507 views
1 Answer
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
EXPERT
James_S
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions