AWS IAM Policy Analyzer
Operator: Abdulla Al Fahad. How tools are built and checked
An IAM request can be refused by six different layers, and the console error rarely says which. This page takes the policy documents you paste, replays one request through AWS's published evaluation order, and names the statement that decided it: an explicit deny, a missing allow in an SCP, a permissions boundary that is narrower than the identity policy, or a session policy.
It also reads the same documents without a request, flagging administrator-style wildcards, privilege-escalation combinations and action names that do not exist. Everything is evaluated from what you paste, so anything you leave out, such as an SCP, is invisible to it, and the result includes a note to that effect.
Key features
- Simulator for same-account and cross-account requests that follows the AWS order: explicit deny, RCP, SCP, resource-based policy, identity policy, permissions boundary, session policy
- Resource-policy grant rules from the AWS documentation: a policy naming an IAM user or a role session ARN is not limited by identity policies, a boundary or a session policy, while a role ARN grant is limited by a boundary and a session policy
- Wildcards in Action, NotAction, Resource and NotResource, policy variables such as ${aws:username}, and the condition operators String, Numeric, Date, Bool, BinaryEquals, IpAddress (IPv4 and IPv6), Arn and Null with IfExists, ForAnyValue and ForAllValues
- Lint for Allow with NotAction, wide wildcards, 21 known privilege-escalation combinations, permissions-management actions on all resources, public principals and unknown actions with a did-you-mean suggestion
- Effective-permission summary per service, counting how many of the service's actions the identity policies allow after a boundary and SCPs
- Markdown and JSON reports; the Markdown escapes quoted text
How a request is evaluated and what the lint rules check
The action list behind the unknown-action check and the summary is the AWS Service Reference, fetched 2026-11-16: 457 services and 22,581 actions, each with its access level (Read, Write, List, Tagging, Permissions management). It goes stale when AWS adds actions, so the page shows the date, and an unknown action is reported as a suggestion to check, not as an error.
Request context follows the documented rules. When a condition key is absent from the request, a positive operator is false and a negated one (StringNotEquals, NotIpAddress, ArnNotLike) is true; IfExists passes; ForAllValues passes on an empty set and ForAnyValue fails on one; Null tests for presence. With several values, a positive operator needs one match and a negated operator needs none to match. aws:PrincipalArn, aws:PrincipalAccount, aws:PrincipalType, aws:username and aws:ResourceAccount are filled in from the ARNs, and every other key is only present if you type it.
Escalation rules are the widely published combinations, such as iam:PassRole with ec2:RunInstances or lambda:CreateFunction, iam:CreatePolicyVersion, iam:AttachUserPolicy and glue:UpdateDevEndpoint. A rule fires when the pasted identity policies allow every action of the combination and no unconditional deny on all resources removes one. Resource limits and conditions are not weighed, so a rule scoped to one ARN is reported at lower severity.
Limits: 12 documents of 128 KB, 400 statements per document. Not modelled: service-specific resource rules such as S3 ACLs and Block Public Access, KMS grants, VPC endpoint policies, tag-based keys you do not supply, and cross-account permission boundaries on the resource side.
How it works
Each statement is tested for Action (or NotAction), Resource (or NotResource), Principal for resource policies, and every Condition entry; the trace lists which parts matched and which did not. Wildcards are matched by a loop that cannot backtrack exponentially, and policy variables are replaced from the request context before matching, with ${*}, ${?} and ${$} kept as literal characters.
When this helps
- A platform engineer's developers get AccessDenied on s3:PutObject although the role policy says s3:*. Pasting the role policy and the team's boundary shows the boundary stops at s3:Get* and s3:List*, so the fix is the boundary, not the role.
- A bucket policy names arn:aws:iam::111122223333:user/ci as principal. The simulator shows the CI user succeeds with an empty identity policy and a boundary that allows nothing, because a direct user grant is not limited by either, so removing the user's policy would not close the access.
- A reviewer pastes a 40-statement inherited policy and gets 9 findings. Two are critical: a statement with Action * on Resource * and an Allow with NotAction that grants every service launched since the policy was written.
- A security team checks a CI role with iam:PassRole and lambda:CreateFunction. The escalation list reports the PassRole plus Lambda path, and the fix is to scope PassRole to one role ARN with iam:PassedToService set.
Opening a file
- Paste each policy document, choose its type, or drop several .json files.
- Enter the caller, action and resource ARN, and any context keys the request carries.
- Choose Evaluate request and read the trace, then open Findings for the lint results.
- Download the Markdown or JSON report.
Example
An identity policy, a boundary and an SCP for role session dev/ann in account 111122223333 (the built-in example)
Identity: Allow s3:* on the reports bucket; Deny s3:* when aws:SecureTransport is false; Allow ec2:RunInstances and iam:PassRole on *
Boundary: Allow s3:Get*, s3:List*, ec2:*, iam:PassRole
SCP: Allow *; Deny ec2:* outside eu-west-1 and eu-central-1
Request: s3:PutObject on arn:aws:s3:::reports/q1.csv with aws:SecureTransport = trueDecision and trace
Deny: the permissions boundary does not allow the action (steps 1 to 5 pass, step 6 fails)
Same request with s3:GetObject: Allow
ec2:RunInstances with aws:RequestedRegion = us-east-1: Deny, explicit deny in the SCP statement 2
Findings: 3 (iam:PassRole on all resources, the PassRole plus RunInstances escalation path, and an informational note that the SCP allows everything)Tips for best results
- Add each context key your real request carries, such as aws:SourceIp or aws:RequestedRegion. A missing key is the usual reason a Deny with StringNotEquals fires when you expected it not to.
- For a role session, enter both the assumed-role session ARN and the role ARN; resource policies can name either, and the two behave differently against a boundary.
- Paste every SCP level from the root to the account as separate documents. Each level must allow the action, so a single missing Allow denies it.
- Switch on delegation-only for KMS key policies and role trust policies, which need an explicit principal and do not grant through an account-level principal alone.
Limits
A decision of Allow does not mean AWS allows the call. SCPs, RCPs, boundaries and session policies you did not paste are not evaluated, and the page lists which were missing.
Findings are pattern checks. A policy can be dangerous through resource policies, trust relationships or tags without tripping any rule here.
Policy variables only resolve from the context you provide; an unresolved ${aws:PrincipalTag/team} makes the statement not match, which the page notes.
Common errors and how to fix them
- Statement 2: needs Action or NotAction
- Every statement requires one of the two. Add the action list, or remove the empty statement.
- Not valid JSON
- The page reads strict JSON. Remove comments and trailing commas, and make sure the whole document, including the outer braces, was copied.
- The action should look like s3:GetObject
- A request names one concrete action with its service prefix. Wildcards belong in policies, not in the simulated request.
Best practices
- Name each pasted policy after the file or console policy it came from, so the trace points at the statement's real home.
What the simulator will not tell you
Anything not pasted is invisible. Organization policies above the account, a boundary attached to the role, a session policy passed at sign-in and a resource policy all change the answer, and the result lists each one that was missing. Service rules that live inside a service, such as S3 Block Public Access, KMS grants and VPC endpoint policies, are outside the model.
Treat the page as a way to understand why a request is allowed or denied and to catch risky patterns early. For a statement about production, run the same request through the IAM policy simulator or IAM Access Analyzer.
Reading the trace
Step 1 stops at the first explicit Deny in any pasted document. Steps 2 and 3 need an Allow in every RCP and SCP level you pasted. Step 4 classifies a resource-policy grant: a named IAM user or session ARN (direct, final), Principal * with an aws:PrincipalArn condition (final), a role ARN, an account or a bare * (limited by a boundary and a session policy).
Steps 5 to 7 check the identity policies, the boundary and the session policy. The trace says which step failed and quotes the matching parts of the deciding statement, so you can see whether it was the action, the resource or a condition that did not match.
Frequently asked questions
Which AWS page does the evaluation order follow?
The order and the grant rules for resource policies follow the AWS page on policy evaluation logic (explicit deny, RCPs, SCPs, resource-based policies, identity-based policies, permissions boundaries, session policies). The rules for user, role and session principals in resource policies come from the same page's account-level section. Treat any disagreement with the IAM policy simulator as a bug to check against AWS.
Why is a role ARN in a resource policy limited by a boundary when a user ARN is not?
AWS documents it that way: a resource policy that names a role ARN grants to the role session, which is still limited by an implicit deny in the boundary or session policy, while one that names an IAM user ARN or a session ARN grants directly. The simulator applies exactly that distinction and states which class the grant fell in.
Can it tell me which actions a role really has in production?
Only for the documents you supply. For the live answer use IAM Access Analyzer or the IAM policy simulator against the account, which also sees organization policies and tags.
What does the effective-permission table count?
For each of the 457 services it counts actions allowed by the identity policies, minus actions removed by an unconditional Deny on all resources, and after the boundary and every SCP allow list. It works at action level, so resource ARNs and conditions only decide whether an action is counted as allowed on all resources or limited.