Topic 1 Question 166
A company is releasing a new static website hosted on Amazon S3. The static website hosting feature was enabled on the bucket and content was uploaded; however, upon navigating to the site, the following error message is received:
403 Forbidden - Access Denied
What change should be made to fix this error?
Add a bucket policy that grants everyone read access to the bucket.
Add a bucket policy that grants everyone read access to the bucket objects.
Remove the default bucket policy that denies read access to the bucket.
Configure cross-origin resource sharing (CORS) on the bucket.
ユーザの投票
コメント(9)
- 👍 4Liongeek2022/11/16
- 正解だと思う選択肢: A
A. Add a bucket policy that grants everyone read access to the bucket.
To fix the error message "403 Forbidden - Access Denied" when trying to access a static website hosted on Amazon S3, you should add a bucket policy that grants everyone read access to the bucket. By default, Amazon S3 bucket policies deny all public access to the bucket and its contents. To allow users to access the static website hosted on the bucket, you need to add a bucket policy that grants read access to the bucket. You can do this by specifying a bucket policy that includes a "Principal" element with the value "*" (wildcard), which grants access to everyone, and an "Action" element with the value "s3:GetObject", which allows users to retrieve objects from the bucket.
Option B, adding a bucket policy that grants everyone read access to the bucket objects, would not be a valid solution, as this would not grant read access to the bucket itself.
👍 4MrMLB2022/12/20 - 正解だと思う選択肢: B
B. Per AWS: https://repost.aws/knowledge-center/s3-static-website-endpoint-error "If an Access Denied error is returned by the web browser or cURL command, then the object isn't publicly accessible. To allow public read access to your S3 object, create a bucket policy that allows public read access for all objects in the bucket."
I'm not sure why everyone here is trying to provide answers without actual references. How you think in your head is irrelevant if it's not correct with AWS documentation.
👍 3Domdom1202023/02/26
シャッフルモード