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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ