Skip to content
AWS · IAM

AWS IAM Policy Simulator

Test whether a request is allowed or denied across identity, resource, SCP, RCP, boundary and session policies — and see exactly where it stopped.

Last updated · evaluation logic checked against the AWS IAM User Guide

AWS Cloud Tools
AWS IAM Policy
Simulator

Test and simulate AWS IAM policy decisions instantly — paste any policy, set the request context, and get a precise Allow / Deny verdict with a full statement-by-statement evaluation trace. No AWS account needed.

AWS documented evaluation order — Deny, RCP, SCP, resource, identity, boundary, session Multi-layer: identity policy + resource policy + SCP + boundary Full statement trace — see exactly which rule fired and why Condition simulation — IP, MFA, region, tags, org, and more Batch mode — test 20+ actions simultaneously in one run Pre-built scenarios for common real-world security questions
// Last Simulation
Step 1 — Define Policy Layers
Quick load:
Step 2 — Request Context
Context Conditions Optional
Quick context:
Evaluation Trace
Batch Simulation Results
#ActionResourceDecisionMatching StatementConditions Met
Scenario Library — Real-World Security Tests
🟢 S3 Read Allowed User with S3 read policy gets an object — should Allow Expected: ALLOW
🔴 S3 Write Denied Read-only user attempts PutObject — explicit deny Expected: DENY
🔐 MFA Not Present Deny condition blocks request when MFA is false Expected: DENY
✅ MFA Present Same policy — MFA is true, condition satisfied Expected: ALLOW
⚔️ Deny Overrides Allow Both Allow and explicit Deny — Deny must win Expected: DENY
⭐ Wildcard Resource Policy uses * resource — matches any ARN Expected: ALLOW
🌐 IP Restriction Source IP condition — request from unknown IP Expected: DENY
🔗 Cross-Account Access Resource policy grants cross-account with trust Expected: ALLOW
🏢 SCP Blocks Action Org SCP denies EC2 launch even with IAM Allow Expected: DENY
🚫 Implicit Deny No matching Allow — default implicit deny Expected: IMPLICIT DENY
IAM Evaluation Order
StepCheckOutcome
1Explicit Deny in any policy→ DENY immediately
2SCP — does it allow the action?→ DENY if no Allow
3Permissions Boundary check→ DENY if outside boundary
4Resource policy (same account)→ ALLOW if grants access
5Identity policy explicit Allow→ ALLOW
6No matching Allow found→ IMPLICIT DENY
Condition Matching Rules
RuleBehaviour
Multiple conditions in one blockAll must match (AND logic)
Multiple values in one conditionAny must match (OR logic)
Condition key missing from contextCondition fails → statement skipped
StringLike wildcard* = any chars, ? = one char
...IfExists suffixPass if key missing; else evaluate normally
ForAllValues: prefixAll values in set must match
ForAnyValue: prefixAt least one value must match
Null checkNull: true passes if key absent
Global Context Keys Quick Reference
Context KeyTypeExample ValueUse Case
aws:SourceIpIP203.0.113.1Restrict access by caller IP address
aws:MultiFactorAuthPresentBooltrueRequire MFA for sensitive actions
aws:RequestedRegionStringus-east-1Restrict API calls to specific regions
aws:PrincipalAccountString123456789012Match the caller's AWS account
aws:PrincipalOrgIDStringo-abc123Restrict to principals in your AWS Org
aws:SecureTransportBooltrueRequire HTTPS — block plaintext HTTP
aws:CalledViaStringcloudformation.amazonaws.comOnly allow calls through CloudFormation
aws:useridStringAIDAI...aliceMatch specific IAM user by unique ID
aws:ResourceTag/keyStringprodRestrict by resource tag value
aws:RequestTag/keyStringteam-aRequire specific tag on create requests

How AWS IAM Policy Evaluation Works — Complete Guide

Understanding how AWS evaluates IAM policies is critical for building secure cloud architectures. This simulator follows the evaluation logic AWS documents in the IAM User Guide, including resource control policies, session policies and cross-account rules, so you can test decisions and debug access issues before deploying. Use it to learn and pre-check, and confirm important decisions with the AWS IAM policy simulator or IAM Access Analyzer.

The AWS policy evaluation order

  1. Explicit Deny: AWS checks every applicable policy (RCPs, SCPs, resource-based, identity-based, permissions boundaries and session policies). If any Deny statement matches, the request is denied.
  2. Resource control policies (RCPs): if the resource’s account has RCPs and none allows the request, it is denied.
  3. Service control policies (SCPs): if the caller’s account has SCPs and none allows the action, it is denied — for every principal in the account, including its root user. SCPs and RCPs do not apply to the organisation’s management account.
  4. Resource-based policies: in the same account, a resource policy that names the caller can grant access on its own. Granting to an IAM user or a role session is not limited by the caller’s identity policies or permissions boundary; granting to a role ARN is still limited by a permissions boundary and session policy. Granting to the whole account only delegates — the identity policy must also allow.
  5. Identity-based policies: if no attached policy allows the action, it is implicitly denied.
  6. Permissions boundaries: if the user or role has a boundary that does not allow the action, it is denied.
  7. Session policies: for role and federated sessions with a session policy, the session policy must also allow the action.

Role trust policies and AWS KMS key policies are special: the trust or key policy must allow the caller explicitly — an identity-based Allow alone is not enough.

Explicit Deny vs Implicit Deny — What’s the Difference?

An explicit deny is a matching statement with "Effect": "Deny". Nothing can override it. An implicit deny is simply the absence of an Allow — the default state — and a matching Allow in the right policy grants access.

How Conditions Are Evaluated

  • All operators and keys in a Condition block must be true (AND). For one key with several values, the condition is true if the request matches any value — except negated operators such as StringNotEquals, which are true only if the request matches none of them.
  • StringEquals, StringLike and ARN comparisons are case-sensitive; condition key names are not.
  • If the key is missing from the request: positive operators are false, negated operators are true, …IfExists is true, and ForAllValues is true (a common trap — add a Null check).
  • Policy variables such as ${aws:username} or ${aws:PrincipalTag/team} only work with "Version": "2012-10-17".

Cross-Account Access Rules

When a principal in account A accesses a resource in account B, both evaluations must allow it: the caller’s identity-based policy in account A and the resource-based policy in account B. An explicit Deny on either side wins. In the same account, a resource-based policy that names the caller can be enough on its own.

Common IAM Policy Debugging Patterns

  • Access denied but the policy shows Allow: look for an explicit Deny elsewhere — an SCP, RCP, permissions boundary, session policy or the resource policy.
  • Condition not matching: check the key name and value, letter case (StringEquals is case-sensitive), and whether the key is actually present in that request.
  • S3 access denied cross-account: the bucket policy must name your principal or account AND your identity policy must allow the S3 action on that bucket. KMS-encrypted objects also need the key policy to allow you.
  • Role can’t do what the user can: check the role’s permissions boundary and any session policy passed when it was assumed.

Frequently Asked Questions

What is the AWS IAM Policy Simulator?
It is a browser tool that follows the AWS documented policy evaluation logic. You provide a policy and a request context (action, resource, conditions), and the simulator tells you whether the request would be allowed or denied — and exactly why.
Does explicit Deny always win in AWS IAM?
Yes. A matching explicit Deny in any applicable policy overrides every Allow, including administrator policies and the root user. Note that SCPs and RCPs are not applied to the organisation’s management account, so a Deny in an SCP does not affect it.
What is the difference between a permissions boundary and an SCP?
A permissions boundary is attached to a specific IAM entity and limits that entity's maximum effective permissions. An SCP is applied at the AWS Organization or OU level and limits the maximum permissions for all principals in that account. Both must allow an action for it to be permitted — they restrict but never grant permissions.
Why is my request denied even though I have an Allow policy?
The most common causes are: (1) An explicit Deny in another attached policy, SCP, or permissions boundary. (2) A condition in the Allow statement that is not satisfied by the request context. (3) The resource ARN in the policy doesn't match the requested resource. Use the simulator's trace view to identify exactly which step caused the denial.
Can I test IAM conditions like aws:SourceIp?
Yes. Use the Context Conditions section to set any AWS global or service-specific context key. Set aws:SourceIp to an IP address, aws:MultiFactorAuthPresent to true or false, or aws:RequestedRegion to a region name — the simulator evaluates all conditions against your policy.
Is my policy data sent to any server?
No — completely private. All simulation logic runs entirely in your browser using JavaScript. No policy JSON, ARNs, account IDs, or context values are ever transmitted. You can safely test with real policy data.
Practical guide

Debugging "AccessDenied" step by step

When AWS denies a request, the cause is in one of seven places. The simulator checks them in the same order AWS does, and the flowchart shows where the request stopped. Here is how to use each part.

1. Enter the real caller

The result depends on who is calling. A role in the same account, a role in another account, an IAM user, an AWS service and an anonymous caller are all treated differently. Use the ARN AWS actually sees:

  • a role session: arn:aws:sts::111122223333:assumed-role/AppRole/session;
  • an IAM user: arn:aws:iam::111122223333:user/alice;
  • a service name, such as s3.amazonaws.com;
  • * for anonymous.

If the resource ARN has no account ID (S3 buckets, for example), enter the bucket owner's account, so the simulator can tell whether the request is cross-account.

2. Add every policy that applies

In Multi-Layer mode you can paste:

  • the identity policy;
  • the resource policy (bucket, queue, key or trust policy);
  • SCPs and RCPs from AWS Organizations;
  • a permissions boundary;
  • a session policy.

To load a real user or role, go to Import from AWS and load the output of aws iam get-account-authorization-details. It combines inline, managed and group policies, and adds the permissions boundary. The file never leaves your browser.

3. Set the request context

Conditions decide most real-world denials. The key helper suggests keys for the action you typed. Some keys are filled in automatically, as AWS does: aws:PrincipalArn, aws:PrincipalAccount, aws:username for IAM users, and aws:CurrentTime. Keys that can hold several values, such as aws:TagKeys, take a JSON list: ["env","team"].

4. Read the result

  • Explicit deny: a Deny statement matched. Nothing can override it, so change the Deny or add a condition that excludes this request.
  • Implicit deny: nothing allowed the request. How to fix it shows the smallest statement that would allow it and where it belongs, and can add it and re-run.
  • Cross-account: both sides must allow it — the caller's identity policy and the resource policy.
  • Trust and KMS key policies must allow the caller explicitly, even in the same account.

5. Keep it working

Use Matrix to test many actions, resources and callers at once, and download the results as CSV. Save important expectations in the Test suite (for example, "the app role cannot delete the bucket"), and re-run them after every policy change. Share a link that holds the whole setup; the policies travel in the link after #, so share it only with people allowed to see them.

Official references

Runs 100% in your browser. Your files and data never leave your machine. Nothing is uploaded or stored.

Need a hand with your AWS setup?

Get help from an AWS architect who builds and runs contact centre and AI workloads: IAM, data pipelines, Bedrock and cost reviews.