Dung (Donny) Nguyen

Senior Software Engineer

IAM Permissions Evaluations

AWS Identity and Access Management (IAM) permissions are evaluated with a simple, yet powerful, logic that determines whether a user, role, or other identity can perform a specific action. The core principle is that all requests are denied by default, and you must explicitly allow an action for it to be permitted.

This evaluation is not a simple “first-match-wins” system. Instead, AWS evaluates all applicable policies and then follows a specific set of rules to make the final decision. The hierarchy of these rules is the most critical part of the evaluation logic.


Evaluation Hierarchy

The AWS IAM policy evaluation process can be summarized in three key rules, which are evaluated in the following order:

  1. Explicit Deny Overrides Everything 🚫 If any single policy contains an Effect: "Deny" statement that applies to the request, the request is immediately denied, regardless of any Allow statements in other policies. This is the highest precedence rule. A single explicit deny will always win.

  2. Explicit Allow ✅ If there are no explicit deny statements that apply, the next step is to look for an Effect: "Allow" statement. If at least one policy has an Allow statement that permits the requested action, the request is allowed.

  3. Default Deny ❌ If there are no explicit Deny statements and no Allow statements that apply to the request, the request is denied by default. This is the foundation of the least-privilege security model in AWS.


How it Works in Practice

Imagine you have an IAM user named “Alice” who needs to access a specific S3 bucket.

This simple but strict logic ensures that you can grant broad permissions and then use explicit denies to create “security holes” to prevent specific dangerous actions, providing a robust security framework.

References: Comprehensive Guide of AWS IAM Policy evaluation logic