Course contentsShow
← Cloud and Infrastructure
Lesson 381 of 2,9897. Identity and Access ManagementFree lesson

AWS IAM Policy Evaluation Logic

Understanding how AWS evaluates policies including explicit deny, implicit deny, and policy precedence.

AWS IAM Policy Evaluation Logic

You'll learn: How AWS decides whether to allow or deny your access requests by evaluating multiple policy types in a specific order.

When you try to access an AWS resource, the system doesn't just look at one policy—it checks all applicable policies and follows strict rules to decide "allow" or "deny." Understanding this logic is crucial to writing secure, predictable permission configurations.

The Evaluation Flow

AWS evaluates policies in this order:

  1. Check for Explicit Deny – If any policy explicitly denies the action, access is immediately blocked. No other policies can override a deny.

  2. Check for Explicit Allow – If no explicit deny exists, AWS looks for at least one policy that explicitly allows the action.

  3. Implicit Deny (Default) – If there's no explicit allow and no explicit deny, AWS defaults to deny. You must be explicitly granted permission to do anything.

The Golden Rule: Deny Always Wins

Think of it like a bouncer at a club. Even if you have five VIP passes (allow policies), one "banned for life" notice (explicit deny) keeps you out. The deny is absolute.

Conversely, having no VIP pass means you can't enter—that's the implicit deny. Silence equals "no permission."

Policy Precedence

When multiple policies apply (identity-based, resource-based, SCPs), AWS evaluates all of them. An explicit deny in any policy blocks access, but you need an explicit allow in at least one policy to proceed—assuming no denies exist.

Key Takeaway: AWS IAM follows a simple hierarchy: explicit deny beats everything, explicit allow is required for access, and the default is always deny—this "deny-unless-allowed" model keeps your resources secure by default.