IAM Policy Size Calculator
Size an IAM policy document against its character limit and see how many statements still fit before you must split it.
Inputs
AWS counts the whole JSON document, but not whitespace, against this limit.
Policy Document Size
4,605characters
Character Limit
6,144characters
Headroom Remaining
1,539characters
Limit Utilisation
75.0%
Size After Minifying
3,776characters
Statements That Fit
16
Assessment
Comfortably within limit
Step by step
Values used
Statements in the policy = 12 statements; Average characters per statement = 380 characters; Policy type and its character limit = Managed policy — 6144; Whitespace you could strip = 18 %
IAM Policy Size
policy size = statements × characters per statement + document overhead, and utilisation = size ÷ the limit for that policy type.
AWS IAM character limits
Managed policy 6144 characters; aggregate inline policy 2048 (user), 5120 (group), 10240 (role).
Policy Document Size
= 4,605 characters
Character Limit
= 6,144 characters
Headroom Remaining
= 1,539 characters
Limit Utilisation
= 75.0
Size After Minifying
= 3,776 characters
Statements That Fit
= 16
How it works
The document overhead covers the Version element and the outer JSON wrapper, then each statement contributes its Sid, Effect, Action, Resource and Condition characters. Dividing the remaining budget by the average statement length tells you how many more statements the same document can hold. Policy character limits are hard quotas: a deploy that pushes a policy one character over the limit fails with LimitExceeded, usually in the middle of a change window.
Formulas
IAM Policy Size
policy size = statements × characters per statement + document overhead, and utilisation = size ÷ the limit for that policy type.
- overhead
- Version, wrapper and bracket characters outside the statements
- utilisation
- Fraction of the character limit consumed
AWS IAM character limits
Managed policy 6144 characters; aggregate inline policy 2048 (user), 5120 (group), 10240 (role).
- 6144
- Hard limit on a single customer or AWS managed policy
Frequently Asked Questions
How is IAM Policy Size calculated?
policy size = statements × characters per statement + document overhead, and utilisation = size ÷ the limit for that policy type. The document overhead covers the Version element and the outer JSON wrapper, then each statement contributes its Sid, Effect, Action, Resource and Condition characters. Dividing the remaining budget by the average statement length tells you how many more statements the same document can hold.
Why does IAM Policy Size matter?
Policy character limits are hard quotas: a deploy that pushes a policy one character over the limit fails with LimitExceeded, usually in the middle of a change window.
What values do I need to enter?
This calculator takes 4 inputs: Statements in the policy, Average characters per statement, Policy type and its character limit, Whitespace you could strip. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Does whitespace count toward the AWS policy size limit?
No. AWS states that whitespace is not counted when it measures a policy against the character limit, so pretty-printing your JSON is free. Everything else — Sids, long ARNs, condition keys — does count, which is why the minified figure here is a floor rather than the number AWS enforces.
What do I do when a policy will not fit?
Split it across several managed policies (up to 10 can attach to one role by default, raisable to 20), replace enumerated resource ARNs with wildcards or paths, drop Sid strings, and move repeated conditions into a permissions boundary or SCP instead of duplicating them per statement.
You might also need
- JWT Payload Size CalculatorCommonly used together
- AWS IAM Policy CalculatorCommonly used together
- RBAC Role Count CalculatorCommonly used together
- IAM Health Score CalculatorAlso in Identity & Access Management
- GCP IAM CalculatorAlso in Identity & Access Management
- Kerberos Ticket Lifetime CalculatorAlso in Identity & Access Management