Security, Compliance, and Governance

An S3 bucket policy grants DeleteObject directly to a same-account IAM role session ARN, while the role's permissions boundary omits that action. With no other applicable denies, which change blocks deletion without editing the bucket policy or removing the role's read access?

Show the answer

Correct answerD. Add a DeleteObject explicit deny to the boundary

AWhy not this: An allow-only session policy creates an implicit deny for deletion, which does not restrict this direct role-session grant.

BWhy not this: An allow-only boundary still relies on an implicit deny, which does not override this direct role-session grant.

CWhy not this: Removing identity-policy allows leaves an implicit deny, which does not override this direct role-session grant.

DWhy this is right: An explicit deny overrides the resource-policy allow while leaving permitted read operations unaffected.

An explicit deny in the permissions boundary overrides the bucket policy's allow. A same-account resource-policy grant directly to a role session ARN is not restricted by an implicit deny in identity policies, permissions boundaries, or session policies.