IAM Policy Converter
Convert AWS IAM JSON policy documents into Terraform, CloudFormation, CDK TypeScript, or CDK Python snippets.
Choose IaC output format
IAM JSON policy
Converted Terraform policy
data "aws_iam_policy_document" "policy" {
statement {
sid = "ReadExampleBucket"
effect = "Allow"
actions = [
"s3:GetObject",
"s3:ListBucket"
]
resources = [
"arn:aws:s3:::example-bucket",
"arn:aws:s3:::example-bucket/*"
]
}
}Convert IAM JSON policies into infrastructure as code
Paste an AWS IAM JSON policy document and convert it into Terraform, CloudFormation, CDK TypeScript, or CDK Python without uploading a file.
How to use the IAM policy converter
- Paste or edit a valid IAM JSON policy document in the editor.
- Select Terraform, CloudFormation, CDK TypeScript, or CDK Python as the target format.
- Copy the generated infrastructure-as-code snippet into your project.
Starting from scratch instead? Use the AWS IAM policy generator to build a policy from searchable AWS action metadata first. Reviewing an existing policy? Run it through the AWS IAM policy validator before converting it into infrastructure as code, or use the IAM policy tester to check expected allow and deny decisions.
Frequently asked questions
Which target formats does the IAM policy converter support?
Does this validate IAM permissions?
Can I convert identity policies and resource-based policies?
Does the Terraform output create an IAM policy resource?
Does the CDK output include imports or a full stack?
Will the converted policy be identical to my pasted JSON?
Does this make my policy least privilege?
Do I need to upload a policy file?
Related tools
AWS IAM Policy Generator
Generate AWS IAM policies from searchable action metadata and export ready-to-use JSON, Terraform, or CloudFormation snippets.
AWS IAM Policy Validator
Validate and test AWS IAM JSON policy documents with inline errors, warnings, and Access Analyzer-inspired security checks.
AWS IAM Policy Tester
Test AWS IAM policy decisions against expected allow and deny cases with action search and resource ARNs.
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.