AWS IAM Policy Generator
Generate AWS IAM policies from searchable action metadata and export ready-to-use JSON, Terraform, or CloudFormation snippets.
Step 1
Configure defaults
Set the policy mode and ARN defaults before choosing actions. These values seed generated resources and principals for new action cards.
Step 2
Choose the actions
Tip: use asterisks to match anything and commas to filter multiple values at once.
Step 3
Configure actions
No actions selected yet.
Search for a service or IAM action above to start generating a policy.
Build IAM policies from AWS action metadata
This generator uses AWS IAM action metadata to help you find actions, pick resources and condition keys, and turn the result into policy documents you can paste into AWS, Terraform, or CloudFormation.
How to use the IAM policy generator
- Search for an AWS service, service prefix, or action name.
- Filter actions by access level when you only want list, read, write, permission, or tagging actions.
- Choose whether you are building an identity policy or a resource/trust policy.
- Configure resources, condition keys, and principals for the selected actions.
- Copy the generated JSON, Terraform, or CloudFormation policy document.
Identity policies vs resource policies
IAM identity policies attach to users, groups, or roles and do not contain a Principal element. Resource-based policies and trust policies include principals because they define who can access or assume the target resource. The generator hides or shows principal controls based on the selected policy type.
Least-privilege policy workflow
Start with the smallest set of actions you know you need, replace wildcard resources with specific ARNs when the service supports them, then add conditions for tags, organization IDs, source accounts, or other context keys where they fit your access model.
Need a service-specific resource policy? Switch to the S3 bucket policy generator, SNS topic policy generator, SQS queue policy generator, or VPC endpoint policy generator.
Already have policy JSON? Use the AWS IAM policy validator to test it for syntax and security findings, the IAM policy tester to check expected allow and deny decisions, or the IAM policy converter to turn reviewed JSON into Terraform, CloudFormation, or CDK snippets.
Frequently asked questions
Should I create an IAM identity policy or a resource policy?
Why do IAM identity policies omit Principal?
When should I use service principals?
Can I use wildcard actions or resources in an IAM policy?
Which condition keys should I add to IAM policies?
Can I use the generated IAM policy in Terraform or CloudFormation?
Related tools
IAM Policy Converter
Convert AWS IAM JSON policy documents into Terraform, CloudFormation, CDK TypeScript, or CDK Python snippets.
Amazon VPC Endpoint policy generator
Generate VPC endpoint policies from AWS Policy Generator action metadata and export JSON, Terraform, or CloudFormation snippets.
Amazon SQS Policy Generator
Generate SQS queue policies from AWS Policy Generator action metadata and export JSON, Terraform, or CloudFormation snippets.
Next step
Want AWS engineering that feels this practical?
I build these tools to make AWS easier to manage. If this level of quality is what you want in your own cloud platform, Towards The Cloud can help with landing zones, infrastructure as code, security reviews, migrations, and cost optimization.