All Tools View Categories About Contact Privacy

IAM SCP Root Restriction Generator

Build an AWS Organizations SCP that denies high-risk actions specifically for the account root user.

Must be attached via AWS Organizations — to the org root, an OU, or a specific account. This is not a regular IAM policy: attaching this JSON directly to an IAM user, group, or role does nothing to restrict root, and it has no effect at all in an AWS account that is not part of an Organization.
0
Deny statements
0
chars (no whitespace)
5,120
SCP limit
-
structurally valid

  

About IAM SCP Root Restriction Generator

The AWS account root user has full, unrestrictable access by default and cannot be limited with an ordinary IAM policy — root has no attached identity policy to constrain in the first place. The widely-documented mitigation is an AWS Organizations Service Control Policy (SCP) that explicitly denies a curated set of high-risk actions specifically when the calling principal is root, using the condition pattern AWS itself documents for this purpose: "Condition": {"StringLike": {"aws:PrincipalArn": "arn:aws:iam::*:root"}} combined with "Effect": "Deny". IAM SCP Root Restriction Generator builds exactly that document from a checklist of common root-restriction targets, without requiring you to hand-write the condition syntax correctly yourself.

This tool is deliberately narrower than a general-purpose SCP builder: every statement it produces targets root specifically via the aws:PrincipalArn condition, so IAM users and roles in the account are unaffected by these Deny statements and can continue performing the listed actions through their own IAM permissions as normal — only the root user is blocked. The checklist covers seven commonly recommended root-restriction targets: all IAM changes (creating/deleting users, roles, policies, groups, and attaching policies), creating root access keys, billing and payment method changes, closing the account or leaving the organization (account:CloseAccount / organizations:LeaveOrganization), disabling CloudTrail logging, changing the root password, and changing the AWS Support plan. Toggle whichever subset applies to your organization's policy and the tool assembles them into one SCP document.

This must be attached at the AWS Organizations level — not as a regular IAM policy. The JSON shape happens to look identical to an ordinary IAM policy, which is exactly what makes this mistake easy to make: pasting this document into IAM as a customer-managed or inline policy does nothing to restrict root, because IAM policies are never evaluated against the root user's actions at all. It only takes effect when attached, through AWS Organizations, to the organization root, an organizational unit, or an individual member account — and even then, only accounts that are actually members of an AWS Organization are affected. A standalone AWS account with no Organization has no SCP evaluation layer at all, so this generator's output would have no effect if applied outside Organizations.

The size check runs against the real, separate 5,120-character AWS Organizations SCP quota (not any of the IAM policy size limits used elsewhere on this site), measured the way AWS actually measures it — excluding whitespace.

Features

  • Root-specific Deny pattern using the documented aws:PrincipalArn StringLike condition against arn:aws:iam::*:root.
  • 7-item curated checklist of common root-restriction targets, toggle any subset.
  • Explicit, visible warning that this must be attached via AWS Organizations, never as a plain IAM policy.
  • Correct, SCP-specific 5,120-character limit check, not a mislabeled IAM policy quota.
  • Built on the same statement/document engine as this site's other policy tools.
  • Copy as JSON and Download .json.
  • 100% client-side.

How to Use

  1. Check the root-restriction targets you want denied (IAM changes, access keys, billing, account closure, disabling logging, password changes, support plan).
  2. Click Build SCP.
  3. Review the generated Deny statements and the character count against the 5,120 SCP limit.
  4. Copy or download the JSON.
  5. Attach it in AWS Organizations — to the org root, an OU, or a specific account — never as a regular IAM policy.

Examples

Example 1 — minimal root lockdown. Check only "Deny creating root access keys" and "Deny root account closure" — a small 2-statement SCP well under the size limit.

Example 2 — comprehensive. Check all seven items — a multi-statement SCP covering IAM changes, access keys, billing, closure, logging, password, and support plan, all scoped to root only.

Example 3 — the common mistake this tool warns against. Pasting the generated JSON into an IAM user's permissions instead of attaching it via AWS Organizations — the tool's own banner calls this out explicitly, since it is a silent no-op rather than an error.

Benefits

  • Uses the real AWS-documented root-restriction condition pattern, not an approximation.
  • Curated, genuinely common targets instead of an open-ended builder.
  • Loud warning against the most common deployment mistake (attaching as a plain IAM policy).
  • Correct SCP-specific size limit, separate from IAM policy quotas.
  • Distinct from the general SCP Generator — purpose-built for root restriction.
  • Private — runs entirely in your browser.

Frequently Asked Questions

Does this generate a normal IAM policy or an SCP?
An SCP (Service Control Policy) document. The JSON shape is identical to an IAM policy — <code>Version</code>, <code>Statement</code>, <code>Effect</code>, <code>Action</code>, <code>Resource</code>, <code>Condition</code> — but it only works when attached at the <strong>AWS Organizations</strong> level, to an account or organizational unit. Attaching this same JSON as a regular IAM identity-based or resource-based policy does nothing useful and will not restrict the root user at all — SCPs and IAM policies are evaluated in completely different places.
Why target the root user specifically with a condition instead of just not giving IAM policies to root?
The AWS account root user cannot be restricted by any IAM policy — it does not have an attached policy at all and cannot be denied via identity-based permissions. An SCP is one of the only mechanisms (alongside things like restricting root credential usage entirely) that can place a real boundary on what the root user is allowed to do, because SCPs apply to every principal in the account, including root, before IAM is ever consulted. The <code>aws:PrincipalArn</code> <code>StringLike</code> condition against <code>arn:aws:iam::*:root</code> is the standard AWS-documented pattern for scoping a Deny to root specifically (in any account under the SCP's scope) without also blocking IAM users/roles from doing the same actions.
Is this different from the general SCP Generator tool on this site?
Yes. The general SCP Generator builds broad account/OU-wide guardrails (region restriction, prevent leaving the org, prevent disabling logging) that apply to every principal in scope. This tool is narrowly focused on one well-known security pattern — restricting the root user specifically — using the <code>aws:PrincipalArn</code> root condition, with a curated checklist of common root-restriction targets (IAM changes, access keys, billing, account closure, disabling logging, password changes, support plan changes).
Does this stop root from logging in at all?
No. It denies the specific listed actions when performed by root; it does not block root sign-in itself. Blocking root sign-in is a separate control (e.g. via AWS IAM Identity Center centralized root access management, or simply never using root credentials day to day, which AWS recommends regardless).
What happens if I attach this to just one member account instead of the whole organization?
SCPs can be attached at the organization root, an OU, or an individual account — attaching it to one account restricts only that account's root user. It still must go through AWS Organizations (Organizations console/CLI/API), never through IAM directly.
Why is the size limit shown here 5,120 characters and not one of the IAM policy limits?
SCPs have their own AWS Organizations character quota (5,120 characters, excluding whitespace) that is separate from IAM's managed-policy/role-inline/user-inline/group-inline quotas used elsewhere on this site. This tool checks against the correct SCP-specific limit.
Can an SCP Deny like this be overridden by an Allow somewhere?
No — an explicit Deny in an SCP always wins over any Allow, anywhere, including in the account's own IAM policies or in another SCP. That is what makes this pattern a reliable guardrail rather than a suggestion.
Is anything I select or generate here sent anywhere?
No — the checklist, statement assembly, and size check all run locally in your browser.