Skip to content
IAM Policy Generator

30 questions, answered from the data

Answers to common questions about AWS IAM policies: what a policy is, how managed and inline policies differ, what the AWS policy simulator and IAM Access Analyzer do, and what the size limits are. Each answer is short, names the AWS page behind it and gives the date it was read, 16 Nov 2026.

Open the workbench ยท Read the method

What is an IAM policy?
An IAM policy is an object that defines permissions when it is attached to an identity or resource. AWS evaluates it when a principal makes a request, and most policies are JSON documents of statements with Effect, Action, Resource and Condition elements. AWS documents nine policy types. See the IAM policy page and AWS's policy overview, read 16 Nov 2026.
How many types of IAM policy does AWS have?
AWS documents nine policy types: identity-based, resource-based, VPC endpoint, permissions boundary, Organizations service control, Organizations resource control, access control list, Resource Access Manager share and session policies. Only access control lists do not use JSON. AWS lists them in its policy overview, read 16 Nov 2026, and the policy types page explains each.
What is the difference between a trust policy and an IAM policy?
A trust policy is the resource-based policy on an IAM role that says who may assume the role. An identity-based IAM policy attached to the role says what the role may do once assumed. AWS says a role needs both, because it is an identity and a resource (AWS Principal element, read 16 Nov 2026).
What is the difference between an AWS managed policy and a customer managed policy?
AWS creates and maintains AWS managed policies, and you cannot change them, while you create and edit customer managed policies in your own account. Both are standalone and attach to many identities. AWS says it may update a managed policy when a new service launches, affecting every attached identity (AWS documentation, read 16 Nov 2026).
Should I use an inline policy or a managed policy?
AWS says an inline policy keeps a strict one-to-one link with one user, group or role and is deleted with it, and that if a policy could apply to more than one entity a managed policy is better. Inline copies of the same permissions drift apart. The inline versus managed page lists the size limits for each (AWS).
What is the difference between ReadOnlyAccess and ViewOnlyAccess?
Counted against AWS's action reference of 16 Nov 2026, ReadOnlyAccess grants 7,202 actions and the job function policy ViewOnlyAccess grants 2,279. ReadOnlyAccess includes eight actions that AWS classifies as Write and three as Permissions management. The managed policies page shows how the counts were made from the AWS policy documents.
Is AdministratorAccess too broad to use?
AdministratorAccess has one statement that allows Action star on Resource star, which was 22,556 actions in AWS's reference of 16 Nov 2026. AWS recommends using it only for the account administrator, and says AWS managed policies do not grant least privilege. See the managed policies page and the AWS managed policy guidance.
What is the IAM policy simulator?
The IAM policy simulator is an AWS tool that tests identity-based policies, permissions boundaries, SCPs and resource-based policies you supply, without sending a real request. Each action and resource returns allowed or denied. AWS warns that results can differ from the live environment (AWS documentation, read 16 Nov 2026).
Does the IAM policy simulator support resource control policies?
No. AWS documentation says the policy simulator evaluates SCPs, including condition keys and resource scoping in deny statements, but does not support resource control policies. Results can also differ for VPC endpoint policies, role chaining and several resource-based policies on one resource. See the simulator page and AWS, read 16 Nov 2026.
Is this workbench an IAM policy simulator?
No. The workbench reads and checks a policy in your browser. It expands wildcards against AWS's service reference, labels access levels and runs six checks on the text. It does not evaluate the policy against an AWS account, uses no credentials and uploads nothing. For account evaluation, AWS provides its own simulator, described on the simulator page.
What does IAM Access Analyzer do?
AWS says IAM Access Analyzer finds resources shared with external entities, shows internal access to selected resources, reports unused access, validates policies against grammar and best practices, runs custom policy checks and generates policies from CloudTrail activity. See the Access Analyzer page and AWS, read 16 Nov 2026.
Does IAM Access Analyzer cost anything?
Part of it. AWS's pricing page, read 16 Nov 2026, says external access analyzers and policy validation are provided at no additional charge, while internal access analyzers, unused access analyzers and custom policy checks are paid features. The pricing page lists the rates, which this site does not copy because they change.
How does IAM Access Analyzer work?
You create an analyzer with a zone of trust, which is your organization or account. For external access it uses logic-based reasoning on resource-based policies and creates a finding when a policy grants access to a principal outside the zone. AWS says new or changed policies are analyzed within about 30 minutes (AWS, read 16 Nov 2026).
How do I validate an IAM policy?
Use IAM Access Analyzer policy validation. In the IAM console it checks a policy in the JSON editor, and from the CLI aws accessanalyzer validate-policy takes a policy document and a policy type. AWS says validation provides more than 100 checks (best practices, read 16 Nov 2026).
What is the character limit for an IAM policy?
AWS sets 6,144 characters for each managed policy. Inline policies are limited in total per entity: 2,048 characters for a user, 10,240 for a role and 5,120 for a group. IAM does not count white space. These limits cannot be raised (AWS quotas, read 16 Nov 2026). See the size limits page.
How many managed policies can I attach to a role?
The default is 20 managed policies per role, with a maximum of 25 on request. AWS announced on 19 Aug 2026 that it raised the default from 10 to 20. A user can have 10 by default with a maximum of 20, and a group 10 (AWS quotas, read 16 Nov 2026).
What does Resource star mean in an IAM policy?
It means every resource the actions can apply to. It is not always broad: AWS notes that iam:ChangePassword with Resource star affects only the password of the caller. With write actions it can be very broad. The workbench flags Write and Permissions management actions on star (AWS policy overview, read 16 Nov 2026).
What does s3:* allow in an IAM policy?
It matches every S3 action. In AWS's service reference of 16 Nov 2026 that is 180 actions: 66 Read, 57 Write, 27 Permissions management, 18 List and 12 Tagging. A narrower pattern such as s3:Get* matches 63 Read actions. See the wildcards page for more counts.
What is NotAction in an IAM policy?
NotAction matches every action except the ones listed. With Allow, everything unlisted is allowed, including actions added later; with Deny, everything unlisted is denied. AWS warns it could grant more than intended (AWS NotAction page, read 16 Nov 2026). The workbench flags Allow with NotAction as high severity.
What is iam:PassRole?
iam:PassRole is the permission to pass an IAM role to an AWS service, so the service can assume the role and act for you. AWS says to avoid letting a user pass a role with more permissions than intended, and to filter the permission by role ARN and the iam:PassedToService key (AWS, read 16 Nov 2026).
What is an external ID in a trust policy?
An external ID is a value a third party must present when assuming your role, set as an sts:ExternalId condition in the trust policy. AWS says its main purpose is to prevent the confused deputy problem, and that it is not a secret, since anyone who can view the role can see it (AWS, read 16 Nov 2026).
What conditions should a service role trust policy have?
AWS recommends aws:SourceArn, aws:SourceAccount, aws:SourceOrgID or aws:SourceOrgPaths whenever a service principal is granted access, so the service acts only for resources, accounts or organizations you expect. This guards against the confused deputy problem (AWS, read 16 Nov 2026). The workbench flags a service trust with none.
How do I trust a GitHub Actions workflow in a role?
Create an IAM OIDC identity provider, then a role whose trust policy names the provider as a Federated principal with sts:AssumeRoleWithWebIdentity and conditions on token claims. AWS says IAM accepts either the sub or the job_workflow_ref claim as the scoping control for GitHub Actions since 12 May 2026 (IAM document history).
In what order does AWS evaluate IAM policies?
AWS authenticates the principal, processes the request context, then evaluates policies. An explicit deny in any applicable policy overrides an allow. Identity and resource policies in one account combine as a union, while permissions boundaries, SCPs and RCPs intersect with them (AWS evaluation logic, read 16 Nov 2026).
Do service control policies grant permissions?
No. AWS says an SCP defines a permission guardrail and sets limits, and no permissions are granted by it. Administrators must still attach identity-based or resource-based policies. SCPs do not affect users or roles in the management account (AWS Organizations, read 16 Nov 2026).
What are the five IAM access levels?
AWS classifies actions as List, Read, Write, Tagging or Permissions management. In its reference of 16 Nov 2026, Write is 11,606 of 22,556 actions and Permissions management is 434. AWS suggests restricting or monitoring policies that include the Permissions management level (AWS).
How many IAM actions are there?
AWS's service reference listed 457 services and 22,556 actions when fetched on 16 Nov 2026. EC2 had the most with 834 actions. AWS's own Policy Generator configuration listed 22,674 action entries the same day, so counts depend on the file and the date. See the actions page.
What happens when a condition key is missing from the request?
The condition is false for most operators, and true for negated operators such as StringNotLike. The IfExists forms and the Null check test whether the key exists. AWS states this in its condition operators documentation (AWS, read 16 Nov 2026). See the condition keys page.
What is the difference between ForAllValues and ForAnyValue?
Both compare a multivalued key. ForAnyValue is true if at least one request value matches the policy, and ForAllValues is true if all do. AWS says ForAllValues also returns true when the key is absent, and suggests adding a Null condition (AWS, read 16 Nov 2026).
Can IAM generate a policy from past activity?
Yes. IAM Access Analyzer reads AWS CloudTrail events for a user or role over a period of up to 90 days and produces a policy template of the actions and services used. A CloudTrail trail must be enabled, and action-level activity for data events is not identified (AWS, read 16 Nov 2026).

Last reviewed 16 Nov 2026.