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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠