AWS ARN Parser & IAM Policy Generator.
Split AWS ARNs into partition, service, region, account and resource, or build an IAM policy statement.
Runs in your browserAbout AWS ARN Parser & IAM Policy Generator
This tool does two everyday AWS jobs. In parse mode it splits Amazon Resource Names into their parts. Every ARN has the shape arn:partition:service:region:account-id:resource, but the resource part varies by service: S3 objects use bucket/key with no region or account, IAM roles can carry a path such as role/service-role/MyRole, Lambda functions can end with a version or alias qualifier, and EC2 uses instance/i-0abc. The parser handles these cases, returns one table row per ARN and flags suspicious values: an unknown partition, a region that does not look like eu-west-1, an account that is not 12 digits, a region on a global service like IAM, or wildcards. A line that is not an ARN at all, for example one with only four colons, is reported with its line number. In policy mode you list actions and resource ARNs and get a policy document with Version 2012-10-17 and a single statement, ready to paste into the console, Terraform or CloudFormation. Duplicate entries are removed and each line is checked: actions must look like s3:GetObject, resources must be ARNs or *. The details table warns about the classic mistakes: Action "*" or s3:* on Allow statements, Resource "*", and resources whose service no listed action can touch, such as giving s3:GetObject on a DynamoDB table. It does not check that an action name really exists. Everything runs in your browser and no AWS credentials are involved.
How to Use
- Choose parse to inspect ARNs, or policy to build an IAM statement.
- Paste ARNs one per line, or list actions and resources and pick Allow or Deny.
- Copy the JSON result and review the warnings in the details table.
Frequently Asked Questions
Why do S3 bucket ARNs have empty region and account fields?
S3 bucket names are globally unique, so bucket and object ARNs omit both, as in arn:aws:s3:::my-bucket/key. Access point ARNs are regional and do include them.
Does the generator check that an action exists?
No. It checks the service:Action format and wildcards but does not ship the full AWS action list, so a typo like s3:GetObjects passes. Use IAM Access Analyzer's policy validation for that.
Can I add conditions or several statements?
The generator produces one statement without conditions. Paste the JSON into your editor and add a Condition block or more statements there.
Is anything sent to AWS?
No. Parsing and generation run in your browser; the page makes no requests and needs no credentials.
Related Tools
Pretty print, minify, and validate JSON.
Parse database URLs, JDBC, PDO DSN and ADO.NET strings, or build them, for Postgres, MySQL, SQL Server, MongoDB, Redis.
Test regular expressions with match highlighting.
Encode and decode URL components.
Parse pasted logs into a table and filter by level or text — JSON lines, Laravel, nginx/Apache, syslog.
Build a Conventional Commits message with scope, body, breaking change and footers, plus the git command.