A retail company needs to provide a series of data files to another company, which is its business partner. These files are saved in an Amazon S3 bucket under Account A, which belongs to the retail company. The business partner company wants one of its IAM users, User_DataProcessor, to access the files from its own AWS account (Account B). Which combination of steps must the companies take so that User_DataProcessor can access the S3 bucket successfully? (Choose two.)
Show Answer & Explanation
Correct Answers: C. In Account A, set the S3 bucket policy to the following: { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::AccountB:user/User_DataProcessor" }, "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::AccountABucketName/*" ] }; D. In Account B, set the permissions of User_DataProcessor to the following: { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": "arn:aws:s3:::AccountABucketName/*" }
For cross-account S3 access, you need both the resource-based policy (bucket policy in Account A) and the identity-based policy (IAM permissions in Account B). Option C correctly sets the bucket policy in Account A with a Principal specifying the exact IAM user ARN from Account B, along with the necessary actions (GetObject and ListBucket). Option D correctly grants the IAM user in Account B permissions to access the specific S3 bucket resources. Both policies must work together - the bucket policy grants permission TO the user, and the IAM policy grants permission FOR the user to perform those actions. Option A is wrong because CORS is for web browser cross-origin requests, not cross-account access. Option B is wrong because it lacks the Principal field, making it invalid. Option E is wrong because IAM user policies don't use the Principal field - that's only for resource-based policies.