IAM policy simulator
A free IAM tool that tells you whether a policy, or an existing identity, would allow a given action on a given resource, without doing anything.
In more detail
simulate-custom-policy judges a policy document you pass in; simulate-principal-policy judges every policy attached to an existing identity. You can supply condition values with --context-entries, and MatchedStatements shows which statement produced a decision. It only answers permission questions, not quotas, costs or missing resources.
Example
aws iam simulate-custom-policy --policy-input-list "$(cat scoped-deploy.json)" --action-names s3:GetObject s3:DeleteBucket --resource-arns arn:aws:s3:::site-bundles-prod/index.htmlRelated terms
- policy evaluation logic — The fixed order AWS uses to decide a request: an explicit deny wins, otherwise any allow wins, otherwise the answer is deny.
- dry run — Sending a real request in a check-only mode, so the system reports whether it would succeed without actually making the change.
- missing context values — The simulator field that lists condition keys a policy tested but the simulated request did not supply.
- least privilege — Giving every program and person only the access they need, and nothing more.
Taught in
- The Shared Responsibility Model — Cloud Infrastructure & Hyperscaler Architecture
- Policies and Least Privilege — Cloud Infrastructure & Hyperscaler Architecture
- Policy Simulation and Dry Runs — Cloud Infrastructure & Hyperscaler Architecture
- S3: Permissions, Tiers, and Policies — Cloud Infrastructure & Hyperscaler Architecture