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.
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.
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.