AWS IAM Policy Builder
Write each statement as a line of effect, actions, resources and an optional condition, and get a valid IAM policy document in JSON.
Use the tool
Why this tool exists
Writing IAM JSON by hand means juggling Statement arrays, single values versus lists, and nested Condition blocks, where one missing bracket produces an opaque error in the console. A compact line format makes the intent easier to see, and the JSON can be generated from it.
Here each line is one statement: Allow or Deny, comma-separated actions, comma-separated resource ARNs and, if you want, a condition such as StringEquals aws:RequestedRegion=eu-west-1. The tool checks the shape of each action and the effect, numbers the statement IDs and sets the 2012-10-17 version. It does not know which actions exist, so run the result through the IAM Policy Linter and the AWS policy simulator.
How to use it
- Write one statement per line: Effect | actions | resources | optional condition.
- Add a principal only if you need a resource policy such as a bucket policy.
- Copy the JSON into IAM, then lint it and test it in the policy simulator.
Frequently asked questions
What does the condition format look like?
Use Operator key=value, for example StringEquals aws:RequestedRegion=eu-west-1. Several values can be separated with commas. Only one condition per statement is supported.
When should I fill in the principal field?
For resource-based policies such as S3 bucket policies. Leave it blank for identity policies attached to a user, group or role. Use a star for any principal, with care.
Does it check that actions really exist?
No. It checks the service:Action pattern and allows wildcards, but it has no list of AWS actions. A misspelt action will pass, so test in the policy simulator.
Is my policy uploaded?
No. The JSON is built in your browser from what you type. Avoid pasting real account IDs into any page you do not trust.