CertKeen

AWS Developer Associate (DVA-C03) · Free practice question 5 of 12

Explicit deny in policy evaluation

A developer at Ravensworth Media has an identity policy allowing s3:* on a reports bucket, but the bucket policy contains a statement denying s3:DeleteObject for all principals except an admin role. What happens when the developer tries to delete an object?

  1. A.The request is denied, because an explicit deny in any applicable policy overrides an allow
  2. B.The request is denied only if the developer's account also has a service control policy
  3. C.The request is allowed, because s3:* is more specific than the s3:DeleteObject action
  4. D.The request is allowed, because identity policies take precedence over bucket policies
Show answer and explanation

Correct answer: A. The request is denied, because an explicit deny in any applicable policy overrides an allow

Why: In AWS policy evaluation, an explicit deny in any applicable policy always wins over allows. Identity policies do not outrank resource policies, and wildcards are not treated as more specific than named actions. The deny in the bucket policy applies on its own; no service control policy is needed for it to take effect.

More free AWS Developer Associate (DVA-C03) questions