A user's identity policy allows s3:GetObject on a bucket, but the bucket policy contains an explicit Deny for that user. What is the result of the request?
ADenied only if the bucket policy also lists that user in a NotPrincipal element
BAllowed, because both statements are evaluated and the allow matches first
CDenied, because an explicit deny anywhere in IAM always overrides any allowCorrect answer
DAllowed, because identity policies take precedence over resource policies
Correct answer
C. Denied, because an explicit deny anywhere in IAM always overrides any allow
AWS evaluates identity-based policies, resource-based policies, permissions boundaries and service control policies together, and an explicit deny in any one of them overrides every allow. If no statement allows the action, the implicit default deny also applies, which is why attaching a policy is not enough without a matching Allow. This deny-wins rule is the single most tested point in IAM policy evaluation.