Security and Compliance

An IAM user has an identity policy allowing object deletion, and an S3 bucket policy also allows it. Another applicable identity policy explicitly denies deletion. What happens?

Show the answer

Correct answerB. Deletion fails because an explicit deny overrides allows.

AWhy not this: A resource-based allow does not override an applicable explicit deny.

BWhy this is right: An applicable explicit deny takes precedence over the identity-based and resource-based allows.

CWhy not this: Policy attachment order does not determine which permissions take precedence.

DWhy not this: AWS does not resolve policy conflicts by counting allow and deny policies.

An applicable explicit deny overrides permissions granted by identity-based or resource-based policies. Policy evaluation does not count allow statements or favor the most recently attached policy.