Given an IAM policy that restricts s3:GetObject and s3:PutObject for a bucket named DOC-EXAMPLE-BUCKET with an exception for objects whose keys start with 'secrets', what level of access do those actions allow?
Choose an answer
Tap an option to check your answer.
Correct answer: Access on all objects in DOC-EXAMPLE-BUCKET except objects with keys that start with 'secrets'.
Why this is the answer
The correct answer states that the policy grants access to all objects in DOC-EXAMPLE-BUCKET except those with keys starting with 'secrets'. This is because the policy explicitly restricts s3:GetObject and s3:PutObject for the bucket, and then applies an exception (likely using a NotResource or a specific Condition that negates the restriction for the 'secrets' prefix). This means the general restriction applies to everything but the 'secrets' objects, effectively allowing access to all other objects. Incorrect options: "Access on all buckets except the DOC-EXAMPLE-BUCKET bucket" is wrong because the policy is specifically scoped to DOC-EXAMPLE-BUCKET. "Access on all buckets that start with 'DOC-EXAMPLE-BUCKET' except the DOC-EXAMPLE-BUCKET/secrets prefix" is incorrect because the policy is for a specific bucket, not all buckets starting with that name, and the 'secrets' prefix is an exception to the restriction, not an exclusion from general access. "Access on all objects in the DOC-EXAMPLE-BUCKET bucket plus all S3 actions for objects in DOC-EXAMPLE-BUCKET that begin with 'secrets'" is incorrect. The policy restricts s3:GetObject and s3:PutObject, and the exception for 'secrets' would typically allow those specific actions, not all S3 actions.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed