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?
- A.The request is denied, because an explicit deny in any applicable policy overrides an allow
- B.The request is denied only if the developer's account also has a service control policy
- C.The request is allowed, because s3:* is more specific than the s3:DeleteObject action
- 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
- Step Functions Retry and Catch fields
- SQS FIFO message groups for ordering
- DynamoDB Streams for change processing
- EventBridge Scheduler one-time invocations
- Hardening S3 bucket access settings
- ApplyGuardrail API for any model
- Previewing stack updates with change sets
- Test traffic hook in ECS blue/green
- API Gateway REST canary release
- SQS visibility timeout for Lambda consumers
- Metric filters for log-based alarms