AWS IAM Policy Linter & Explainer API

Lint and explain AWS IAM policies: expand wildcards to real actions, check ARNs and condition keys, flag admin, PassRole and privilege-escalation risks.

GETPOSThttps://apibox.io.vn/v1/iam-policy
Security & Crypto▶ Try it online

Send an identity-based policy, a resource-based policy (S3 bucket, KMS, SQS…), a role trust policy or an SCP (detected, or set type). The catalogue of ~460 services and ~22,500 actions with their access levels, resource types (ARN formats) and condition keys comes from the AWS Service Authorization Reference and is refreshed weekly. Nothing is sent to AWS and no credentials are needed.

Lint (action=lint, also part of the default analyze): grammar (Version, Effect, Action / NotAction, Resource / NotResource, Principal by policy type, Sid), unknown services and actions with "did you mean", wildcards that match nothing, ARN syntax, actions whose resource type does not match any Resource (classic: s3:GetObject on arn:aws:s3:::bucket without /*), actions that only work with Resource "*", condition operators, unknown or unsupported condition keys, value types, ForAllValues with Allow, * admin grants, service wildcards, Allow + NotAction / NotResource, iam:PassRole on "*", 27 known privilege-escalation paths, public principals and federated trust without conditions, size limits.

Explain (action=explain) lists every statement with the expanded actions and their access level (List / Read / Write / Permissions management / Tagging), resources, principals and conditions, plus a per-service summary. action=minimize rewrites Allow statements to explicit actions filtered by access_levels (e.g. list,read) and / or actions_used (from CloudTrail or IAM Access Analyzer).

Markdown · OpenAPI · Postman · llms.txt

Parameters

NameInTypeRequiredDefault
policybodyobjectyesPolicy JSON (object or string; max 200 KB).
actionbody|querystringnoanalyzeanalyze (lint + explain), lint, explain or minimize (alias mode).
typebody|querystringnoidentity, resource, trust or scp (default: detected).
max_actionsbody|querynumberno200Expanded actions listed per statement.
access_levelsbody|querystringnominimize: keep only these levels, e.g. list,read.
actions_usedbodyarraynominimize: actions actually used (e.g. from CloudTrail).

Example

curl -X POST "https://apibox.io.vn/v1/iam-policy" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"lint","policy":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["s3:GetObject","s3:ListBucket"],"Resource":"arn:aws:s3:::my-bucket"},{"Effect":"Allow","Action":"iam:PassRole","Resource":"*"}]}}'

Response

{
  "valid": true,
  "errors": 0,
  "warnings": 2,
  "info": 0,
  "summary": {
    "type": "identity",
    "statements": 2,
    "allow_all": false,
    "allowed_actions": 3,
    "services": {
      "iam": {
        "Write": 1
      },
      "s3": {
        "List": 1,
        "Read": 1
      }
    }
  },
  "findings": [
    {
      "rule": "resource-mismatch",
      "severity": "warning",
      "message": "No Resource of this statement matches the resource types of s3:GetObject (object actions need arn:aws:s3:::bucket/*, bucket actions arn:aws:s3:::bucket): this action is never granted",
      "statement": 0
    },
    {
      "rule": "passrole-wildcard",
      "severity": "warning",
      "message": "iam:PassRole on Resource \"*\": the principal can hand any role (incl. admin roles) to a service; restrict Resource to specific role ARNs and add an iam:PassedToService condition",
      "statement": 1
    }
  ],
  "source": {
    "name": "AWS Service Authorization Reference (servicereference.us-east-1.amazonaws.com)",
    "licence": "CC BY-SA 4.0 (AWS documentation)",
    "url": "https://docs.aws.amazon.com/service-authorization/latest/reference/service-reference.html"
  },
  "data_built": "2026-11-16"
}

Use cases

  • Review IAM policies in Terraform / CloudFormation pull requests
  • See what s3:Get* or ec2:Describe* really grants before approving it
  • Turn a wildcard policy into a read-only least-privilege policy
  • Audit customer accounts for public trust policies and escalation paths

FAQ

Does it call AWS?

No. Analysis is offline against the published Service Authorization Reference; send only the policy JSON.

Is the action list current?

It is rebuilt weekly from AWS’s machine-readable reference; data_built in the answer shows the date.

Is the effective-permission result exact?

It is an approximation: only unconditional Deny statements on "*" are subtracted, and permission boundaries / SCPs of the account are not known.

Related APIs

Start with 1,000 free requests every month. Get free API key →