exam questions

Exam AWS-SysOps All Questions

View all questions & answers for the AWS-SysOps exam

Exam AWS-SysOps topic 1 question 780 discussion

Exam question from Amazon's AWS-SysOps
Question #: 780
Topic #: 1
[All AWS-SysOps Questions]

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?

  • A. Add a bucket policy that grants everyone read access to the bucket
  • B. Add a bucket policy that grants everyone read access to the bucket objects
  • C. Remove the default bucket policy that denies read access to the bucket
  • D. Configure cross-origin resource sharing (CORS) on the bucket
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Reference:
https://aws.amazon.com/premiumsupport/knowledge-center/s3-website-cloudfront-error-403/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
shimmy
Highly Voted 2 years, 7 months ago
The correct answer is A. You make the BUCKET public, NOT the bucket objects. Link: https://docs.aws.amazon.com/AmazonS3/latest/user-guide/static-website-hosting.html "Step 3: Adding a bucket policy After you edit S3 Block Public Access settings, you can add a bucket policy to grant public read access to your bucket. When you grant public read access, anyone on the internet can access your bucket"
upvoted 18 times
MrDEVOPS
2 years, 7 months ago
Agree with A. Bucket policy should be made for bucket
upvoted 6 times
...
...
tifoz
Highly Voted 2 years, 7 months ago
B. Policy example (look at the asterisk (*) sign) "Resource": [ "arn:aws:s3:::example.com/*" ] REF: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteAccessPermissionsReqd.html
upvoted 10 times
...
albert_kuo
Most Recent 9 months, 3 weeks ago
Selected Answer: B
By default, an S3 bucket does not allow public access to its objects. To make the website content accessible, you need to add a bucket policy that explicitly grants read access to everyone. The policy should allow the "s3:GetObject" action on the bucket objects.
upvoted 1 times
albert_kuo
6 months, 2 weeks ago
https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteAccessPermissionsReqd.html
upvoted 1 times
...
...
gulu73
1 year, 2 months ago
Selected Answer: B
Answer is B Public – Everyone has access to one or more of the following: List objects, Write objects, Read and write permissions. Objects can be public – The bucket is not public, but anyone with the appropriate permissions can grant public access to objects.
upvoted 1 times
...
BugsBunny9998666
1 year, 5 months ago
Selected Answer: A
You need access to object in a bucket not the bucket itself. reversed logic in here but this is the way
upvoted 1 times
BugsBunny9998666
1 year, 5 months ago
B B B B B BBBBBBBBBBBBBBBB marked A by accident
upvoted 1 times
...
...
rb39
2 years, 5 months ago
B - all example policies in https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html include asterisk -> arn:aws:s3:::DOC-EXAMPLE-BUCKET/*
upvoted 2 times
...
Mike777777
2 years, 5 months ago
Okay after a lot of research and looking through the resources that everyone has posted here, as well as re-reading the question a thousand times. I believe I have come to a conclusion. The answer here is B. The ONLY reason it isn't A is because the answer states to "add a bucket policy" to grant read access. You simply edit the "S3 Block Public Access" settings to allow the bucket to be public and THEN apply a BUCKET POLICY that allows read access to the bucket.
upvoted 3 times
...
Mj11Az
2 years, 6 months ago
Go with A . B on required if the object is owned by non bucket owner. https://forums.aws.amazon.com/thread.jspa?threadID=241036 https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteAccessPermissionsReqd.html
upvoted 1 times
...
Pupina
2 years, 6 months ago
I agree with Huy. It is B. Why a wrong answer has a lot of votes?
upvoted 1 times
...
Huy
2 years, 6 months ago
It is B. This is easy to try. Please try yourself. Why wrong answer has a lot of upvotes?
upvoted 2 times
...
Hizumi
2 years, 6 months ago
The answer is B. Based on the reference: Allow public read access to the object in one of the following ways: - Create a bucket policy that allows public read access for all objects in the bucket. - Use the Amazon S3 console to allow public read access for the object. https://aws.amazon.com/premiumsupport/knowledge-center/s3-website-cloudfront-error-403/
upvoted 1 times
...
Diego1414
2 years, 6 months ago
Correct Answer A https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteAccessPermissionsReqd.html B should not be a bucket policy, but an Object ACL
upvoted 1 times
...
Kimle
2 years, 6 months ago
B is ok as per https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteAccessPermissionsReqd.html#block-public-access-static-site but why CORS is not correct ? won't it generate 403 as well ?
upvoted 1 times
...
hdbs
2 years, 6 months ago
B is correct. The object-level permissions are more relevant as the website users must able to perform the s3:GetObject API action to retrieve the objects.
upvoted 1 times
...
juanY
2 years, 6 months ago
I'll go with A: "To make the objects in your bucket publicly readable, you must write a bucket policy that grants everyone s3:GetObject permission. After you edit S3 Block Public Access settings, you can add a bucket policy to grant public read access to your bucket. When you grant public read access, anyone on the internet can access your bucket." "You can use a bucket policy to grant public read permission to your objects. However, the bucket policy applies only to objects that are owned by the bucket owner. If your bucket contains objects that aren't owned by the bucket owner, the bucket owner should use the object access control list (ACL) to grant public READ permission on those objects." https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteAccessPermissionsReqd.html
upvoted 1 times
...
PKss
2 years, 6 months ago
Objects in the bucket must be publicly accessible. Hence B
upvoted 1 times
...
dozymars
2 years, 6 months ago
Answer should be A.
upvoted 1 times
abhishek_m_86
2 years, 6 months ago
The 'Reveal Solution' tab says its B. Do you think that is incorrect?
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago