IAM Policy Generator for AWS

Build identity-based policies for the IAM service itself: who may create roles, attach policies, pass roles to AWS services or manage users. These are the most sensitive permissions in an AWS account, because they can be used to grant other permissions.

Granting a workload access to EC2, Lambda or another service? Use the AWS Policy Generator (single statement, every service except IAM and S3) or the Inline Policy Generator (any service including S3, multiple statements).

Create Your AWS Policy
AWS IAMSecurity

To generate, add at least one action, at least one resource ARN (or choose all resources).

Policy Checker
Import a JSON file or paste a policy to check its structure and get best-practice recommendations
Infrastructure as Code

Generate a policy, then export it as Terraform, OpenTofu, CloudFormation, AWS CDK, or Pulumi.

Check an existing policy

Configure your policy settings and click "Generate Policy" to see the result here, or check the structure of an existing policy using one of the options below.

IAM actions that need extra care

iam:PassRole

Lets a principal hand a role to a service (Lambda, EC2, ECS). Scope it to specific role ARNs and add iam:PassedToService.

iam:CreatePolicyVersion

Rewrites a managed policy for everyone it is attached to. Deny it on policies you use as guardrails.

iam:AttachRolePolicy / iam:PutRolePolicy

Add permissions to a role. Require a permissions boundary with the iam:PermissionsBoundary condition key.

iam:CreateAccessKey

Creates long-lived credentials for a user. Prefer roles; restrict this to self-service on your own user, if needed at all.

Delegating IAM administration safely

Letting a team create its own roles removes a bottleneck, but without limits it is equivalent to giving the team administrator access. The standard pattern combines three controls: a path that marks which roles the team owns (for example /app/), a permissions boundary that every such role must carry, and a Deny that stops anyone removing the boundary or editing the boundary policy.

Worked examples for each part: delegated role creation with a boundary, iam:PassRole scoped to Lambda and MFA for destructive actions. The boundaries vs. SCPs guide explains when to use which guardrail.

Frequently Asked Questions

What does this IAM policy generator create?

Identity-based policies that allow or deny actions of the IAM service itself, such as creating roles, attaching policies, passing roles to services or managing users. Attach the result to the role or group that performs IAM administration.

I need permissions for S3, EC2 or Lambda. Is this the right page?

No. This page is limited to IAM actions. For EC2, Lambda and most other services use the generator on the homepage. For S3, and for multi-statement policies that span several services, use the Inline Policy Generator.

Why are IAM permissions riskier than others?

Many IAM actions can be used to grant permissions, including to yourself. iam:PassRole, iam:CreatePolicyVersion, iam:AttachRolePolicy and iam:PutRolePolicy can each lead to administrator access if they are not scoped. Delegate them with resource paths, conditions and a permissions boundary.

Is it free, and does my policy leave the browser?

It is free and requires no signup. Policies are built and checked in your browser and are not sent to our servers.