Bird
0
0

Which bucket policy snippet correctly grants public read access to all objects in an S3 bucket named "public-bucket"?

easy📝 Syntax Q3 of 15
AWS - S3 Fundamentals
Which bucket policy snippet correctly grants public read access to all objects in an S3 bucket named "public-bucket"?
A{ "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::public-bucket/*" }
B{ "Effect": "Allow", "Principal": "*", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::public-bucket" }
C{ "Effect": "Allow", "Principal": "*", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::public-bucket/*" }
D{ "Effect": "Deny", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::public-bucket/*" }
Step-by-Step Solution
Solution:
  1. Step 1: Identify action for public read

    The action to allow public read access is "s3:GetObject" on all objects.
  2. Step 2: Check resource ARN

    The resource must include all objects: "arn:aws:s3:::public-bucket/*".
  3. Step 3: Verify principal

    Principal "*" means all users (public).
  4. Final Answer:

    { "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::public-bucket/*" } correctly allows public read access to all objects.
  5. Quick Check:

    Allow s3:GetObject on bucket/* with Principal "*" [OK]
Quick Trick: Allow s3:GetObject on bucket/* with Principal "*" [OK]
Common Mistakes:
  • Using s3:ListBucket instead of s3:GetObject for read access
  • Missing the /* suffix in the resource ARN
  • Using Deny instead of Allow for access

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes