35 of 50 in All Controls
aws

Prevent Member Accounts from Leaving the Organization

IDAWS-ORG-002
Severity
critical
Automation
Auto
Category
governance
Enforcementmandatory
Complexity / Impact
low(low impact)
Risk Profile
low likelihood(low residual)
Cloud Scopeaws:root
Environments
productionnon-productionsandbox
Target Resources
AWS::Organizations::Policy
Services
organizations
Tags
governancescporganizationpreventativelanding-zone
Frameworks
NIST 800-53ISO 27001PCI DSSSOC 2AWS FSBP
Governance
Cloud Security (annually)
Created
2026-05-03
Last Updated
2026-11-17

Specification & Description

Attach a Service Control Policy (SCP) at the AWS Organization Root that denies organizations:LeaveOrganization so member accounts cannot detach from central governance.

Technical Specifications

If a member account calls organizations:LeaveOrganization, it immediately drops all inherited SCPs, Resource Control Policies (RCPs), Tag Policies, and delegated security integrations. Attaching a Root-level Deny SCP stops every member account principal, including the member account root user, from detaching the account. Because AWS Organizations never evaluates SCPs against the Management account (and the Management account cannot leave its own organization), no Management account exclusion is required in the policy.

Security Rationale

A detached member account becomes an unmonitored standalone account outside your landing zone guardrails, centralized logging, and billing controls. Preventing LeaveOrganization preserves the integrity of the entire policy hierarchy.

Business & Security Impact

Without this SCP, an administrator or compromised root credential in a member account can remove the account from the organization, bypassing preventative SCPs and central security monitoring.

Policy Exceptions (1)

Intentional account offboarding or divestiture requires removing the account from the organization using RemoveAccountFromOrganization from the Management account or temporarily moving the account to a dedicated offboarding OU exempt from this SCP under change-control approval.

Operational & Implementation Notes

Attaching this SCP at the Organization Root guarantees automatic inheritance for every newly created or invited member account without waiting for OU placement.

Compliance Framework Mappings (5)

Regulatory baselines and industry standards mapped to this control specification.

Beta
Framework / StandardMapped Requirements & ControlsControls
NIST 800-53 Rev 5NIST 800-53
AC-2AC-3CM-2
3
ISO 27001:2022ISO 27001
A.5.15A.8.2A.8.9
3
PCI DSS v4.0PCI DSS
2.2.17.2.1
2
SOC 2SOC 2
CC6.1CC6.3
2
AWS Foundational Security Best PracticesAWS FSBP
Account.2
1

* Compliance framework mappings are provided for informational architectural reference. Always verify control alignment against your organization's formal audit requirements.

Automated Detection & Rule Logic

Detection Engine: aws-api • Automated: Yes

Resolve the Organization Root ID, list custom SCPs attached to Root, and inspect each policy document via describe-policy to confirm an explicit Deny statement covers organizations:LeaveOrganization. Required IAM permissions: organizations:ListRoots, organizations:ListPoliciesForTarget, and organizations:DescribePolicy.

Verify Root SCP Blocks organizations:LeaveOrganizationbash
# 1. Retrieve Organization Root ID
root_id=$(aws organizations list-roots \
  --query "Roots[0].Id" \
  --output text)

# 2. List custom SCPs attached directly to Root
aws organizations list-policies-for-target \
  --target-id "$root_id" \
  --filter SERVICE_CONTROL_POLICY \
  --query "Policies[?AwsManaged==\`false\`].{Id:Id,Name:Name,Arn:Arn}" \
  --output json

# 3. Inspect policy JSON content for organizations:LeaveOrganization Deny
for pid in $(aws organizations list-policies-for-target \
  --target-id "$root_id" \
  --filter SERVICE_CONTROL_POLICY \
  --query "Policies[?AwsManaged==\`false\`].Id" \
  --output text); do
  aws organizations describe-policy \
    --policy-id "$pid" \
    --query "Policy.{Id:PolicySummary.Id,Name:PolicySummary.Name,Content:Content}" \
    --output json
done

Remediation Guide & Automation

From the Management account, create an SCP denying organizations:LeaveOrganization on all resources and attach it directly to the Organization Root so all current and future member accounts inherit it. Required IAM permissions: organizations:ListRoots, organizations:EnablePolicyType, organizations:CreatePolicy, and organizations:AttachPolicy.

Step-by-Step Instructions

  1. Sign in to the AWS Organizations Management account with an administrative role.
  2. Confirm SERVICE_CONTROL_POLICY is enabled on the Organization Root.
  3. Create an SCP named PreventLeaveOrganization that denies organizations:LeaveOrganization on Resource '*'.
  4. Attach the SCP to the Organization Root so all current and future OUs and member accounts inherit it.
Deny Leaving AWS Organization SCPjson
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PreventLeaveOrganization",
      "Effect": "Deny",
      "Action": [
        "organizations:LeaveOrganization"
      ],
      "Resource": "*"
    }
  ]
}
Create and Attach PreventLeaveOrganization SCP via AWS CLIbash
# 1. Retrieve Organization Root ID and ensure SCPs are enabled
root_id=$(aws organizations list-roots \
  --query "Roots[0].Id" \
  --output text)

aws organizations enable-policy-type \
  --root-id "$root_id" \
  --policy-type SERVICE_CONTROL_POLICY

# 2. Create and attach the PreventLeaveOrganization SCP to Root
policy_id=$(aws organizations create-policy \
  --name 'PreventLeaveOrganization' \
  --description 'Deny member accounts from leaving the AWS Organization' \
  --type SERVICE_CONTROL_POLICY \
  --content file://prevent-leave-org-scp.json \
  --query "Policy.PolicySummary.Id" \
  --output text)

aws organizations attach-policy \
  --policy-id "$policy_id" \
  --target-id "$root_id"

We value your privacy

We use analytics cookies to understand how visitors interact with our site and to improve the user experience. You can choose to accept or decline these cookies.