Skip to main content

AWS IAM Cheatsheet and Policy JSON Inspector

Search AWS IAM policy fields, ARNs, conditions, managed policies, trust rules, and inspect policy JSON locally.

  • Runs locally
  • Category Developer & DevOps
  • Best for Formatting, validating, shrinking, or inspecting code-adjacent text.

Policy JSON inspector

Paste a policy JSON document to inspect IAM risk signals locally.
Statements
0
Wildcards
0/0
Allows
0
Denies
0
Findings

-

Paste an IAM policy JSON document to inspect statements, wildcards, PassRole, and S3 ARN shape locally.

Searchable IAM reference

87 entries
Policy JSON (12)
Version

The policy language version. Always set it to "2012-10-17" — it is not a date you pick, it unlocks policy variables and the modern grammar.

Gotcha: Omitting Version defaults to the legacy "2008-10-17" which silently disables policy variables like ${aws:username}.

Examples
"Version": "2012-10-17"
Statement

The array (or single object) holding one or more permission statements. Everything else lives inside it.

Examples
"Statement": [ { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "*" } ]
Effect

Either "Allow" or "Deny" for the statement. Deny always overrides any Allow that matches the same request.

Examples
"Effect": "Allow"
"Effect": "Deny"
Action

The list of API operations the statement covers, in service:Operation form. Supports wildcards.

Gotcha: Action matching is case-insensitive, but stick to the documented casing (s3:GetObject) so policies stay greppable.

Examples
"Action": "s3:GetObject"
"Action": ["s3:GetObject", "s3:PutObject"]
"Action": "s3:Get*"
NotAction

Match every action EXCEPT the ones listed. Powerful and dangerous — with Effect Allow it grants everything else.

Gotcha: A common breach pattern: "Allow" + NotAction iam:* on Resource "*" hands out near-admin while looking restrictive.

Examples
"Effect": "Deny", "NotAction": "s3:*", "Resource": "*"
Resource

The ARN(s) the statement applies to. Required in identity-based policies; "*" means every resource of the action.

Examples
"Resource": "arn:aws:s3:::my-bucket/*"
"Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]
NotResource

Match every resource EXCEPT the listed ARNs. Same blast-radius warning as NotAction.

Examples
"Effect": "Deny", "Action": "s3:DeleteObject", "NotResource": "arn:aws:s3:::archive/*"
Principal

WHO the statement applies to. Only valid in resource-based and trust policies, never in identity-based policies.

Gotcha: Putting Principal in a user/role-attached policy is a silent no-op — IAM ignores it. Use a resource policy instead.

Examples
"Principal": { "AWS": "arn:aws:iam::123456789012:root" }
"Principal": { "Service": "lambda.amazonaws.com" }
"Principal": "*"
Condition

Optional block of key/operator/value tests that must all pass for the statement to take effect.

Examples
"Condition": { "StringEquals": { "aws:PrincipalTag/team": "data" } }
Sid

An optional statement identifier (label). Purely for your own readability and for targeting a statement in a policy diff.

Gotcha: Sid must be unique within a policy. In resource policies it is also how you reference a statement in API calls.

Examples
"Sid": "AllowReadOnlyBucketAccess"
Action wildcards

Use * and ? inside an action: s3:* (all S3), s3:Get* (all reads), s3:Describe?able (single char). Scope before you ship.

Examples
"Action": "s3:*"
"Action": "ec2:Describe*"
"Action": "*"
Resource ARN wildcards

Wildcards work inside an ARN too: arn:aws:s3:::logs-*/* matches every object in every logs- prefixed bucket.

Examples
"Resource": "arn:aws:s3:::logs-*/*"
"Resource": "arn:aws:dynamodb:*:123456789012:table/app-*"
ARN format (9)
ARN general format

arn:partition:service:region:account-id:resource. Global services (IAM, S3) leave region empty; the account-id is your 12-digit number.

Gotcha: partition is aws for commercial, aws-cn for China regions, aws-us-gov for GovCloud. Copy-pasting a us-east-1 ARN into China silently fails.

Examples
arn:aws:service:region:account-id:resource-type/resource-id
IAM user ARN

Identifies an IAM user. Region is empty because IAM is global; path (here /) is part of the ARN.

Examples
arn:aws:iam::123456789012:user/lilei
arn:aws:iam::123456789012:user/eng/backend/lilei
IAM role ARN

Identifies an IAM role — what you reference in a trust policy or assume-role call.

Examples
arn:aws:iam::123456789012:role/MyAppRole
arn:aws:iam::123456789012:role/aws-service-role/...
Assumed-role session ARN

After assume-role your identity is an sts assumed-role ARN, NOT the role ARN — the format differs and trips up Condition matching.

Gotcha: To match an assumed session in a Condition use ArnLike with arn:aws:sts::ACCT:assumed-role/RoleName/*, not the iam role ARN.

Examples
arn:aws:sts::123456789012:assumed-role/MyAppRole/session-name
S3 bucket vs object ARN

The bucket and its objects are TWO different ARNs. Bucket-level actions (ListBucket) need the bucket ARN; object actions need the /* ARN.

Gotcha: The #1 S3 policy bug: granting s3:GetObject on arn:aws:s3:::bucket (no /*) — it matches nothing.

Examples
arn:aws:s3:::my-bucket
arn:aws:s3:::my-bucket/*
arn:aws:s3:::my-bucket/logs/2026/*
Lambda function ARN

Identifies a Lambda function; appending :version or :alias pins a specific deploy target.

Examples
arn:aws:lambda:us-east-1:123456789012:function:my-fn
arn:aws:lambda:us-east-1:123456789012:function:my-fn:prod
Account root ARN

arn:aws:iam::ACCT:root means "the whole account". In a trust policy it delegates trust to the account so its IAM admins can grant access.

Gotcha: root in a Principal does NOT mean the root user — it means "any principal in that account that is also granted by an IAM policy".

Examples
"Principal": { "AWS": "arn:aws:iam::123456789012:root" }
Service principal

AWS services act through a service principal like ec2.amazonaws.com — used in trust policies so the service can assume a role.

Examples
"Principal": { "Service": "ec2.amazonaws.com" }
"Principal": { "Service": "lambda.amazonaws.com" }
Wildcard / partial ARN matching

Use ArnLike or wildcards to match a family of ARNs, e.g. every function under a prefix or every role in an account.

Examples
arn:aws:lambda:*:123456789012:function:billing-*
arn:aws:iam::123456789012:role/ci-*
Conditions (13)
StringEquals / StringNotEquals

Exact, case-sensitive string match (or its negation) on a condition key. The workhorse operator for tag and value checks.

Examples
"StringEquals": { "aws:PrincipalTag/team": "data" }
"StringNotEquals": { "s3:x-amz-server-side-encryption": "aws:kms" }
StringLike / StringNotLike

String match that allows * and ? wildcards — use this, not StringEquals, when the value contains a wildcard.

Gotcha: StringEquals does NOT expand wildcards. "StringEquals: prefix*" matches the literal string "prefix*" and almost always fails.

Examples
"StringLike": { "s3:prefix": "home/${aws:username}/*" }
ArnLike / ArnEquals

Compare a condition key against an ARN pattern. ArnLike allows wildcards; prefer it for aws:SourceArn checks.

Examples
"ArnLike": { "aws:SourceArn": "arn:aws:s3:::my-bucket" }
"ArnLike": { "aws:PrincipalArn": "arn:aws:iam::*:role/ci-*" }
Bool

True/false test. The classic use is requiring MFA or requiring requests over TLS.

Examples
"Bool": { "aws:MultiFactorAuthPresent": "true" }
"Bool": { "aws:SecureTransport": "false" }
IpAddress / NotIpAddress

Restrict by source CIDR using the aws:SourceIp key. Only meaningful for requests not routed through a VPC endpoint.

Gotcha: aws:SourceIp is the PUBLIC IP. From inside a VPC via a gateway/interface endpoint the request has no public IP and this condition denies it.

Examples
"IpAddress": { "aws:SourceIp": ["203.0.113.0/24", "198.51.100.42/32"] }
DateGreaterThan / DateLessThan

Time-bound a statement using ISO-8601 UTC timestamps against aws:CurrentTime — handy for temporary contractor access.

Examples
"DateLessThan": { "aws:CurrentTime": "2026-12-31T23:59:59Z" }
NumericEquals / NumericLessThan

Numeric comparisons, e.g. capping a requested S3 multipart size or an STS session duration.

Examples
"NumericLessThanEquals": { "s3:max-keys": "100" }
Null

Test whether a key is present (false) or absent (true) in the request. Use it to require that a tag was supplied at all.

Examples
"Null": { "aws:RequestTag/project": "false" }
aws:PrincipalTag / aws:ResourceTag

Attribute-based access control (ABAC): grant access only when the caller tag matches the resource tag — scales without per-resource policies.

Examples
"StringEquals": { "aws:ResourceTag/team": "${aws:PrincipalTag/team}" }
aws:RequestTag / aws:TagKeys

Control tagging itself: force which tag keys may be set on create, and which values are allowed.

Examples
"StringEquals": { "aws:RequestTag/env": ["dev", "staging", "prod"] }
"ForAllValues:StringEquals": { "aws:TagKeys": ["env", "owner"] }
aws:PrincipalOrgID

Restrict a resource policy to principals from your AWS Organization — much safer than enumerating account IDs.

Examples
"StringEquals": { "aws:PrincipalOrgID": "o-abc123xyz" }
ForAllValues / ForAnyValue

Set operators for multi-valued keys. ForAllValues: every value in the request is in your list. ForAnyValue: at least one is.

Gotcha: ForAllValues also passes when the key is ABSENT — pair it with a Null check if presence is mandatory.

Examples
"ForAllValues:StringEquals": { "dynamodb:Attributes": ["id", "name"] }
IfExists operator suffix

Append IfExists so a condition only applies when the key is present in the request, and is skipped otherwise.

Examples
"Bool": { "aws:MultiFactorAuthPresentIfExists": "true" }
"StringEqualsIfExists": { "ec2:InstanceType": "t3.micro" }
IAM CLI (19)
aws sts get-caller-identity

Print the account, ARN, and user ID for the current credentials. The "who am I in IAM" check — run it before anything destructive.

Examples
aws sts get-caller-identity
aws sts get-caller-identity --query Arn --output text
aws iam get-user

Return details for the calling IAM user (or a named one): ARN, user ID, path, creation date.

Gotcha: Fails if you are authenticated as a ROLE, not a user — assumed-role sessions have no IAM user. Use get-caller-identity instead.

Examples
aws iam get-user
aws iam get-user --user-name lilei
aws iam list-users

List every IAM user in the account with ARN and creation date.

Examples
aws iam list-users
aws iam list-users --query "Users[].UserName" --output text
aws iam create-role

Create a role with a trust policy (the JSON that says WHO may assume it). The trust policy is mandatory.

Gotcha: A wrong principal ARN or missing condition in trust.json is the most common "AccessDenied when assuming role" root cause.

Examples
aws iam create-role --role-name MyAppRole --assume-role-policy-document file://trust.json
aws iam attach-role-policy

Attach a managed policy (AWS or customer) to a role. Managed policies are reusable and versioned.

Examples
aws iam attach-role-policy --role-name MyAppRole --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
aws iam list-attached-role-policies --role-name MyAppRole
aws iam put-role-policy

Embed an INLINE policy directly on a role. Inline policies have a 1:1 lifecycle with the role — deleted with it.

Gotcha: Inline policies do not show up in list-attached-role-policies. Use list-role-policies to find them.

Examples
aws iam put-role-policy --role-name MyAppRole --policy-name s3-inline --policy-document file://inline.json
aws iam create-policy

Create a reusable customer-managed policy from a JSON document so the same permissions attach to many principals.

Gotcha: Each managed policy keeps at most 5 versions. create-policy-version past 5 fails — delete an old one or set --set-as-default.

Examples
aws iam create-policy --policy-name S3ReadMyBucket --policy-document file://policy.json
aws iam simulate-principal-policy

Test whether a user/role WOULD be allowed an action on a resource without actually performing it. The IAM debugger.

Examples
aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::123456789012:role/MyAppRole --action-names s3:GetObject --resource-arns arn:aws:s3:::my-bucket/key
aws iam list-attached-role-policies

List the MANAGED policies attached to a role. Pair with list-role-policies for the inline ones.

Examples
aws iam list-attached-role-policies --role-name MyAppRole
aws iam list-role-policies --role-name MyAppRole
aws iam create-access-key

Generate a new long-lived access key (AKID + secret) for an IAM user. The secret is shown ONCE — save it now.

Gotcha: Prefer SSO or assume-role over long-lived keys. If you must, rotate every 90 days and delete the old key.

Examples
aws iam create-access-key --user-name lilei
aws iam delete-access-key --user-name lilei --access-key-id AKIA...
aws iam list-access-keys

List a user’s access keys (ID, status, creation date) — metadata only, never the secret.

Gotcha: A user can hold at most TWO keys. That limit exists so you can rotate: create new, deploy, delete old.

Examples
aws iam list-access-keys --user-name lilei
aws iam update-access-key

Set an access key Active or Inactive without deleting it — the safe first step when rotating or investigating a leak.

Examples
aws iam update-access-key --user-name lilei --access-key-id AKIA... --status Inactive
aws iam get-access-key-last-used

Show when/where a key was last used (date, region, service). The "is this key dead?" check before deleting.

Examples
aws iam get-access-key-last-used --access-key-id AKIAIOSFODNN7EXAMPLE
aws iam generate-credential-report

Generate, then get-credential-report, a CSV of every user’s key age, MFA status, and last-used data. Audit gold.

Gotcha: Generation is async — call generate, wait for COMPLETE, then get to read the base64 CSV. Reports cache for 4 hours.

Examples
aws iam generate-credential-report
aws iam get-credential-report --query Content --output text | base64 --decode
aws iam get-account-authorization-details

Dump the entire IAM model — every user, group, role, policy, and attachment — in one JSON blob for offline audit.

Gotcha: Huge on real accounts. Pipe to a file and analyze with jq rather than scrolling the terminal.

Examples
aws iam get-account-authorization-details > iam-dump.json
aws iam get-account-authorization-details --filter Role
aws iam put-role-permissions-boundary

Attach a permissions boundary to a role — a ceiling that caps the effective permissions no matter what policies are attached.

Examples
aws iam put-role-permissions-boundary --role-name DevRole --permissions-boundary arn:aws:iam::aws:policy/PowerUserAccess
aws iam tag-role / tag-user

Attach tags to a role or user — the foundation of ABAC and of cost/ownership tracking.

Examples
aws iam tag-role --role-name MyAppRole --tags Key=team,Value=data
aws iam tag-user --user-name lilei --tags Key=owner,Value=lilei
aws iam list-roles

List all roles in the account; use --path-prefix to skip the noisy service-linked roles.

Examples
aws iam list-roles --query "Roles[].RoleName" --output text
aws iam list-roles --path-prefix /aws-service-role/
aws iam get-policy-version

Read the actual JSON document of a managed policy. You must first get-policy to find the DefaultVersionId.

Examples
aws iam get-policy --policy-arn arn:aws:iam::123:policy/S3ReadMyBucket
aws iam get-policy-version --policy-arn arn:aws:iam::123:policy/S3ReadMyBucket --version-id v3
Managed policies (10)
AdministratorAccess

Full access to every service and action (Allow "*" on "*"). The keys to the kingdom — grant to almost no one.

Gotcha: Even admins should assume an admin ROLE with MFA rather than carry AdministratorAccess on a daily-use user.

Examples
arn:aws:iam::aws:policy/AdministratorAccess
PowerUserAccess

Full access to everything EXCEPT IAM and Organizations. The usual grant for developers who should not manage users/roles.

Examples
arn:aws:iam::aws:policy/PowerUserAccess
ReadOnlyAccess

Read/list/describe across nearly all services. Good default for auditors and dashboards — but it CAN read secrets and object data.

Gotcha: ReadOnlyAccess includes s3:GetObject and secretsmanager:GetSecretValue. For "metadata only" use ViewOnlyAccess instead.

Examples
arn:aws:iam::aws:policy/ReadOnlyAccess
ViewOnlyAccess

List and describe resource metadata only — no GetObject, no secret reads. Safer than ReadOnlyAccess for broad visibility.

Examples
arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
SecurityAudit

Read-only access to configuration metadata across services — the policy auditors and tools like Prowler/ScoutSuite expect.

Examples
arn:aws:iam::aws:policy/SecurityAudit
IAMFullAccess / IAMReadOnlyAccess

Manage (or just read) IAM users, roles, and policies. IAMFullAccess effectively means privilege escalation — treat as admin.

Examples
arn:aws:iam::aws:policy/IAMFullAccess
arn:aws:iam::aws:policy/IAMReadOnlyAccess
AmazonS3ReadOnlyAccess / AmazonS3FullAccess

Service-scoped S3 access. FullAccess is broad (every bucket); prefer a custom policy scoped to specific bucket ARNs.

Examples
arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
arn:aws:iam::aws:policy/AmazonS3FullAccess
AmazonEC2FullAccess

Full EC2 plus the related VPC, ELB, CloudWatch, and Auto Scaling actions needed to actually run instances.

Examples
arn:aws:iam::aws:policy/AmazonEC2FullAccess
AWSLambda_FullAccess

Manage Lambda functions plus the supporting CloudWatch Logs, S3, and event-source actions.

Examples
arn:aws:iam::aws:policy/AWSLambda_FullAccess
Billing / job-function policies

AWS ships role-aligned managed policies under arn:aws:iam::aws:policy/job-function/ — Billing, NetworkAdministrator, DatabaseAdministrator, etc.

Examples
arn:aws:iam::aws:policy/job-function/Billing
arn:aws:iam::aws:policy/job-function/NetworkAdministrator
Trust & AssumeRole (8)
Trust policy basics

A role’s trust policy is a resource policy with Action sts:AssumeRole and a Principal saying who may assume it.

Examples
{ "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:root" }, "Action": "sts:AssumeRole" }
EC2 service trust

Let EC2 instances assume the role via an instance profile by trusting ec2.amazonaws.com.

Examples
{ "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" }
Lambda service trust

The execution role every Lambda needs — trust lambda.amazonaws.com so the service can run your function.

Examples
{ "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }
Cross-account trust

Trust another account’s root (or a specific role) so its principals can assume this role — the standard cross-account access pattern.

Gotcha: Both sides are required: the trust policy here AND an sts:AssumeRole grant on the caller’s side.

Examples
{ "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::999988887777:role/CiDeployer" }, "Action": "sts:AssumeRole" }
ExternalId (confused deputy fix)

For third-party (SaaS) cross-account roles, require a Condition on sts:ExternalId so a vendor cannot be tricked into accessing the wrong customer.

Examples
"Condition": { "StringEquals": { "sts:ExternalId": "unique-customer-token-abc123" } }
OIDC web identity (GitHub Actions)

Federate CI without long-lived keys: trust an OIDC provider and AssumeRoleWithWebIdentity, scoping by repo/branch via the token sub claim.

Examples
"Condition": { "StringLike": { "token.actions.githubusercontent.com:sub": "repo:my-org/my-repo:ref:refs/heads/main" } }
Require MFA to assume

Add a Bool condition on aws:MultiFactorAuthPresent to the trust policy so the role can only be assumed by an MFA-authenticated session.

Examples
"Condition": { "Bool": { "aws:MultiFactorAuthPresent": "true" } }
aws sts assume-role

Get temporary credentials for a role from the CLI. Returns an AKID, secret, AND a session token — export all three.

Gotcha: Forgetting AWS_SESSION_TOKEN is the #1 assume-role failure. Default session is 1h; role chaining caps at 1h regardless of --duration-seconds.

Examples
aws sts assume-role --role-arn arn:aws:iam::123456789012:role/MyAppRole --role-session-name lilei
Evaluation logic (6)
Default deny

Every request starts implicitly denied. Access requires an explicit Allow somewhere in the applicable policies.

Examples
No matching Allow  →  implicit deny  →  AccessDenied
Explicit deny always wins

A single explicit Deny in ANY applicable policy overrides every Allow. This is how guardrails are enforced.

Examples
Allow s3:* + Deny s3:DeleteObject  →  DeleteObject denied, rest allowed
Service Control Policies (SCP)

Organization-level guardrails. An SCP can only RESTRICT — it never grants. If the SCP does not allow it, no IAM policy can either.

Gotcha: SCPs do not apply to the management account or to service-linked roles — a frequent "why isn’t my SCP working" surprise.

Examples
SCP denies region eu-west-1  →  every account in the OU is blocked there
Permissions boundary

A managed policy set as a ceiling on a user/role. The effective permission is the INTERSECTION of the identity policy and the boundary.

Examples
Identity allows s3:* + ec2:*; boundary allows s3:*  →  only s3:* is effective
Identity vs resource policy union

Within ONE account, access is granted if the identity policy OR the resource policy allows it (and nothing denies). Either side can authorize.

Examples
No identity Allow, but bucket policy allows the user  →  access granted
Cross-account needs both sides

Across accounts, BOTH the resource policy (or trust) in the target account AND an IAM policy in the caller’s account must allow it.

Gotcha: This asymmetry vs same-account union is the most common cross-account AccessDenied cause.

Examples
Bucket policy allows acct B, but B’s IAM has no Allow  →  denied
Pitfalls (10)
iam:PassRole is the silent escalation

Launching an EC2/Lambda/ECS task with a role requires iam:PassRole on that role. Granting PassRole on "*" lets a user attach an admin role to compute they control — full takeover.

Gotcha: Always scope PassRole to specific role ARNs and add a Condition on iam:PassedToService.

Examples
"Action": "iam:PassRole", "Resource": "arn:aws:iam::123:role/app-task-role", "Condition": { "StringEquals": { "iam:PassedToService": "ecs-tasks.amazonaws.com" } }
Action:* + Resource:* is admin in disguise

A statement with Allow on Action "*" and Resource "*" is AdministratorAccess no matter what it is named. Wildcards hide the blast radius.

Examples
"Effect": "Allow", "Action": "*", "Resource": "*"
Inline vs managed policies

Managed policies are reusable, versioned, and listed via list-attached-*. Inline policies are 1:1 with the principal, unlisted there, and easy to lose.

Gotcha: A "missing permission" you cannot find is often hiding in an inline policy. Check list-role-policies / list-user-policies.

Examples
aws iam list-role-policies --role-name MyAppRole
Policy size limits

Managed policy doc ≤ 6,144 chars; inline policy per user/role/group ≤ 2,048/10,240 chars depending on type. Whitespace counts.

Gotcha: Hitting the limit means splitting into multiple managed policies (up to 10 attachable per principal) or compacting whitespace.

Examples
Managed policy max: 6144 characters
IAM changes are eventually consistent

A new key, role, or policy edit can take a few seconds to propagate globally. A create-then-use script may briefly 403.

Gotcha: Add a retry-with-backoff after create-role before assume-role, rather than assuming the change is instant.

Examples
create-role → (wait/retry) → assume-role
Access key leaked to git

A committed AKID is scraped by bots within minutes and abused for crypto mining across regions. Delete the key FIRST; history rewrite alone does not help.

Gotcha: iam delete-access-key immediately, audit CloudTrail for the last 24h, then rotate every secret in that account.

Examples
aws iam update-access-key --access-key-id AKIA... --status Inactive --user-name lilei
aws iam delete-access-key --access-key-id AKIA... --user-name lilei
NotAction with Allow over-grants

Allow + NotAction grants everything you did NOT list. People reach for it to "block one thing" and accidentally open the rest.

Gotcha: To block specific actions use an explicit Deny + Action, never Allow + NotAction.

Examples
BAD: "Effect": "Allow", "NotAction": "s3:DeleteObject", "Resource": "*"
StringEquals does not expand wildcards

If a condition value contains * or ?, you must use StringLike. StringEquals treats them as literal characters and the condition silently never matches.

Examples
WRONG: "StringEquals": { "s3:prefix": "home/*" }  →  RIGHT: "StringLike"
Role session vs role ARN in conditions

aws:userid and the caller ARN of an assumed role differ from the role ARN. Match sessions with ArnLike on the assumed-role ARN, not the iam role ARN.

Examples
"ArnLike": { "aws:PrincipalArn": "arn:aws:sts::123:assumed-role/MyAppRole/*" }
Last accessed data, not guesswork

Use IAM Access Analyzer "last accessed" / generate-service-last-accessed-details to right-size a policy from real usage instead of guessing.

Examples
aws iam generate-service-last-accessed-details --arn arn:aws:iam::123:role/MyAppRole

What this tool does

A dense browser-only AWS IAM cheatsheet for cloud engineers, SREs, and developers who need the right policy term while working. Search policy JSON fields, ARN shapes, condition operators, IAM CLI commands, AWS managed policy ARNs, trust-policy patterns, evaluation rules, and common IAM pitfalls such as iam:PassRole escalation, Allow with NotAction, missing S3 object ARNs, role-session ARN matching, access-key leaks, and eventual consistency. Paste an IAM policy JSON document into the local inspector to count statements, allow/deny rules, wildcard actions, wildcard resources, PassRole exposure, S3 object ARN mistakes, Principal usage, and malformed JSON. Nothing is uploaded and long pasted policy text is never stored in the URL.

Tool details

Input
Text
The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
Output
Live result + Copy
The result area focuses on usable output, with copy, download, or preview actions when supported.
Privacy
Browser-side processing
The main tool logic does not call an external API, so inputs normally stay in the current tab.
Save / share
Shareable URL state
Key settings are encoded in the URL so another person can reopen the same setup.
Performance budget
Initial JS <= 32 KB
No WASM budget is declared, keeping the tool quick to open on mobile.
Best fit
Developer & DevOps · Developer
Category and role tags drive related tools, internal links, and quick fit checks.

How to use

  1. 1. Input

    Paste or drop your content into the tool panel.

  2. 2. Process

    Click the button. All processing is local in your browser.

  3. 3. Copy / Download

    Copy the result or download to disk in one click.

How AWS IAM Cheatsheet fits into your work

Use it in the small gaps between coding, reviewing, debugging, and shipping.

Developer jobs

  • Formatting, validating, shrinking, or inspecting code-adjacent text.
  • Preparing snippets for documentation, tickets, commits, or handoff.
  • Checking a small payload quickly without switching tools.

Developer checks

  • Run irreversible transforms like minify or obfuscate on a copy.
  • Keep secrets out of pasted snippets unless the tool explicitly stays local.
  • Use your normal tests or linter before shipping transformed code.

Good next steps

These links move the current task into a more complete workflow.

  1. 1 AWS CLI Cheatsheet AWS CLI cheat sheet — 80+ commands for EC2 / S3 / IAM / Lambda / RDS / EKS / CloudFormation with real examples. Open
  2. 2 API Rate Limit Cheatsheet Search rate-limit headers, retry rules, provider quirks, and paste 429 headers to decode the next safe retry Open
  3. 3 HTTP Security Header Auditor Audit raw response headers for HSTS, CSP, cookie flags, MIME sniffing, clickjacking, referrer, and permissions policy gaps. Open

Real-world use cases

  • Debug an AccessDenied ticket

    Search for the condition key, ARN format, or evaluation concept that appears in the error, then paste the policy to catch obvious shape mistakes before widening access. This keeps the workflow grounded in the actual action/resource pair instead of adding AdministratorAccess as a panic fix.

  • Review a role before deployment

    Paste the planned policy and look for wildcard actions, wildcard resources, PassRole scope, NotAction with Allow, and S3 object ARN mistakes. The copied report is short enough to drop into a pull request or change-control note.

  • Write trust policies faster

    Filter to trust and assume-role entries to compare service principals, cross-account trust, ExternalId, MFA conditions, and OIDC CI patterns. The examples are copy-ready but still annotated with the gotchas that usually cause AssumeRole failures.

Common pitfalls

  • Granting `iam:PassRole` on `*`, which can let a deployer attach an admin role to compute they control.

  • Using a bucket ARN for object actions such as `s3:GetObject`; object actions need the `/*` ARN.

  • Treating `arn:aws:iam::account:root` in a Principal as only the root user instead of the whole account delegation.

Privacy

Search query and group filter are safe URL state for sharing. Pasted IAM policies are kept only in React state in the current tab and are never written to the URL, localStorage, or any external service.

FAQ

Tool combos

Folks in your role tend to reach for these alongside this tool.

Made by Toolora · 100% client-side · Updated 2026-06-13