Question 301 · 732 in bank
An AWS account includes two S3 buckets: bucket1 and bucket2. The bucket2 does not have a policy defined, but bucket1 has the following bucket policy:
In addition, the same account has an IAM User named “alice”, with the following IAM policy.
Which buckets can user “alice” access?
Show answer
Answer: C
Explanation
bucket1 has a policy that explicitly allows user "alice" access to arn:aws:s3:::bucket1/*. bucket2 has no bucket policy, but "alice"’s IAM policy allows access to arn:aws:s3:::bucket2/*. Here's the access situation: bucket1: User "alice" can access bucket1 because the bucket policy explicitly allows it. bucket2: User "alice" can access bucket2 because her IAM policy grants her permission to it, and there is no bucket policy to restrict this access. So, user "alice" can access both bucket1 and bucket2. Therefore, the correct answer is C. Both bucket1 and bucket2.
Source: Adapted from community discussion — IPLogic