Bird
0
0

Which of the following is the correct JSON syntax to allow the s3:ListBucket action on a bucket named my-bucket?

easy📝 Configuration Q12 of 15
AWS - Identity and Access Management
Which of the following is the correct JSON syntax to allow the s3:ListBucket action on a bucket named my-bucket?
A{\"Effect\": \"Deny\", \"Action\": \"s3:ListBucket\", \"Resource\": \"arn:aws:s3:::my-bucket\"}
B{\"Effect\": \"Allow\", \"Action\": [\"s3:ListBucket\"], \"Resource\": \"arn:aws:s3:::my-bucket\"}
C{\"Effect\": \"Allow\", \"Action\": \"s3:ListBucket\", \"Resource\": \"my-bucket\"}
D{\"Effect\": \"Allow\", \"Action\": \"ListBucket\", \"Resource\": \"arn:aws:s3:::my-bucket\"}
Step-by-Step Solution
Solution:
  1. Step 1: Check Action format

    The Action field must be a string or an array of strings. Using an array is valid and recommended for multiple actions.
  2. Step 2: Verify Resource ARN format

    The Resource must be the full ARN: arn:aws:s3:::my-bucket for the bucket itself.
  3. Final Answer:

    Action as array and correct ARN Resource -> Option B
  4. Quick Check:

    Action array + correct ARN = D [OK]
Quick Trick: Use full ARN and array for actions to avoid syntax errors [OK]
Common Mistakes:
  • Using bucket name instead of ARN in Resource
  • Omitting array brackets for multiple actions
  • Using action name without service prefix

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes