Skip to content

Organizations

Chapter 26: AWS Organizations & Service Control Policies

Section titled “Chapter 26: AWS Organizations & Service Control Policies”

AWS Organizations is a free service that enables you to consolidate multiple AWS accounts into an organization that you create and centrally manage.

AWS Organizations Overview
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | AWS Organizations | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | Central | | Account | | Service | |
| | Govern | | Grouping | | Control | |
| | | | | | Policies | |
| | - Billing| | - OUs | | - SCPs | |
| | - Mgmt | | - Hier | | - Perms | |
| +----------+ +----------+ +----------+ |
| |
+------------------------------------------------------------------+
FeatureDescriptionBenefit
Consolidated BillingSingle payment methodCost savings
Account ManagementCreate/delete accountsAutomation
Organizational Units (OUs)Group accountsHierarchical management
Service Control PoliciesPermission boundariesSecurity governance
IntegrationAWS servicesCentralized control

Organization Hierarchy
+------------------------------------------------------------------+
| |
| +--------+ |
| | Root | |
| +--------+ |
| | |
| +----------------+----------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | OU | | OU | | OU | |
| | Security | | Dev | | Prod | |
| +----------+ +----------+ +----------+ |
| | | | |
| +----+----+ +----+----+ +----+----+ |
| | | | | | | |
| v v v v v v |
| +------+ +------+ +------+ +------+ +------+ +------+ |
| |Acct-1| |Acct-2| |Acct-3| |Acct-4| |Acct-5| |Acct-6| |
| |Sec-A | |Sec-B | |Dev-A | |Dev-B | |Prod-A| |Prod-B| |
| +------+ +------+ +------+ +------+ +------+ +------+ |
| |
+------------------------------------------------------------------+
OU Design Patterns
+------------------------------------------------------------------+
| |
| Pattern 1: Environment-Based |
| +------------------------------------------------------------+ |
| | Root | |
| | |-- OU: Production | |
| | |-- OU: Non-Production | |
| | |-- OU: Development | |
| | |-- OU: Testing | |
| | |-- OU: Staging | |
| +------------------------------------------------------------+ |
| |
| Pattern 2: Team/Department-Based |
| +------------------------------------------------------------+ |
| | Root | |
| | |-- OU: Engineering | |
| | |-- OU: Finance | |
| | |-- OU: Marketing | |
| | |-- OU: Security | |
| +------------------------------------------------------------+ |
| |
| Pattern 3: Hybrid (Recommended) |
| +------------------------------------------------------------+ |
| | Root | |
| | |-- OU: Security (Security Tooling) | |
| | |-- OU: Infrastructure (Shared Services) | |
| | |-- OU: Workloads | |
| | |-- OU: Production | |
| | |-- OU: App-Team-A | |
| | |-- OU: App-Team-B | |
| | |-- OU: Non-Production | |
| | |-- OU: Development | |
| | |-- OU: Testing | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Service Control Policies
+------------------------------------------------------------------+
| |
| SCPs are permission boundaries that define the maximum |
| permissions for accounts in an organization. |
| |
| +-------------------+ +-------------------+ |
| | Identity-based | | SCP (Boundary) | |
| | Policies (IAM) | --> | (Allow/Deny) | --> Effective |
| | | | | Permissions |
| +-------------------+ +-------------------+ |
| |
| Note: SCPs do NOT grant permissions - they only limit them |
| |
+------------------------------------------------------------------+
SCP Permission Evaluation
+------------------------------------------------------------------+
| |
| Permission Request |
| | |
| v |
| +------------------------+ |
| | Check Explicit Deny | |
| | in any SCP? | |
| +------------------------+ |
| | | |
| Yes No |
| | | |
| v v |
| +----------+ +------------------------+ |
| | DENY | | Check Explicit Allow | |
| | (Final) | | in any SCP? | |
| +----------+ +------------------------+ |
| | | |
| Yes No |
| | | |
| v v |
| +----------+ +------------------+ |
| | ALLOW | | Implicit Deny | |
| | (Check | | (No permission) | |
| | IAM) | +------------------+ |
| +----------+ |
| |
+------------------------------------------------------------------+
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyAllExceptS3",
"Effect": "Deny",
"NotAction": [
"s3:*",
"iam:GetUser",
"iam:GetRole",
"organizations:Describe*"
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:PrincipalArn": [
"arn:aws:iam::*:role/OrganizationAccountAccessRole"
]
}
}
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PreventLeaveOrganization",
"Effect": "Deny",
"Action": "organizations:LeaveOrganization",
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyNonApprovedRegions",
"Effect": "Deny",
"NotAction": [
"iam:*",
"organizations:*",
"cloudfront:*",
"route53:*"
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"us-east-1",
"us-west-2",
"eu-west-1"
]
}
}
}
]
}

Example 4: Prevent Disabling Security Services

Section titled “Example 4: Prevent Disabling Security Services”
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PreventSecurityServiceDisable",
"Effect": "Deny",
"Action": [
"guardduty:DeleteDetector",
"guardduty:DisassociateFromMasterAccount",
"cloudtrail:DeleteTrail",
"cloudtrail:StopLogging",
"config:DeleteConfigurationRecorder",
"config:StopConfigurationRecorder",
"securityhub:DeleteHub"
],
"Resource": "*"
}
]
}

Recommended Multi-Account Structure
+------------------------------------------------------------------+
| |
| +--------+ |
| | Root | |
| +--------+ |
| | |
| +------------------------+------------------------+ |
| | | | | | |
| v v v v v |
| +------+ +------+ +----------+ +------+ +----------+ |
| |Security| |Infra- | |Workloads | |Sandbox| | Suspended| |
| | OU | |structure| OU | | OU | | OU | |
| +------+ +------+ +----------+ +------+ +----------+ |
| | | | | | |
| v v v v v |
| +------+ +------+ +----------+ +------+ +----------+ |
| |Audit | |Shared | |Prod-Accts| |Test | |Quarantine| |
| |Acct | |Services| |Dev-Accts | |Accts | | Accts | |
| | | | | | | | | | | |
| |Log | |Network| | | | | | | |
| |Archive| |Base | | | | | | | |
| +------+ +------+ +----------+ +------+ +----------+ |
| |
+------------------------------------------------------------------+
Account Factory Architecture
+------------------------------------------------------------------+
| |
| +------------------+ |
| | Account Factory | |
| | (AWS Control | |
| | Tower / Custom) | |
| +------------------+ |
| | |
| v |
| +------------------+ |
| | Account Creation | |
| | Pipeline | |
| | | |
| | 1. Create Account| |
| | 2. Move to OU | |
| | 3. Apply SCPs | |
| | 4. Configure | |
| | Baseline | |
| | 5. Notify Team | |
| +------------------+ |
| | |
| v |
| +------------------+ +------------------+ |
| | New Account | --> | Configured | |
| | (Raw) | | Account | |
| +------------------+ +------------------+ |
| |
+------------------------------------------------------------------+

AWS Control Tower Architecture
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | AWS Control Tower | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | Landing | | Guardrails| | Account | |
| | Zone | | (Controls)| | Factory | |
| | | | | | | |
| | - Multi | | - Prevent | | - Auto | |
| | Account| | - Detect | | Create | |
| | - Baseline| | - SCPs | | - Config | |
| | - Config | | - Config | | - OU | |
| +----------+ +----------+ +----------+ |
| |
+------------------------------------------------------------------+
Control Tower Guardrails
+------------------------------------------------------------------+
| |
| Preventive Guardrails (SCPs) |
| +------------------------------------------------------------+ |
| | - Disallow public S3 buckets | |
| | - Disallow public RDS snapshots | |
| | - Disallow unapproved regions | |
| | - Disallow disabling CloudTrail | |
| | - Disallow leaving organization | |
| +------------------------------------------------------------+ |
| |
| Detective Guardrails (AWS Config Rules) |
| +------------------------------------------------------------+ |
| | - Detect public S3 bucket access | |
| | - Detect unencrypted EBS volumes | |
| | - Detect MFA not enabled | |
| | - Detect root account usage | |
| | - Detect missing CloudTrail | |
| +------------------------------------------------------------+ |
| |
| Proactive Guardrails (CloudFormation Hooks) |
| +------------------------------------------------------------+ |
| | - Prevent non-compliant resource creation | |
| | - Validate configurations before deployment | |
| | - Enforce tagging requirements | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Terminal window
# Create organization
aws organizations create-organization \
--feature-set ALL
# Describe organization
aws organizations describe-organization
# List accounts
aws organizations list-accounts
# Create organizational unit
aws organizations create-organizational-unit \
--parent-id r-xxxx \
--name "Production"
# List OUs
aws organizations list-organizational-units \
--parent-id r-xxxx
# Move account to OU
aws organizations move-account \
--account-id 123456789012 \
--source-parent-id r-xxxx \
--destination-parent-id ou-xxxx-xxxx
# Create account
aws organizations create-account \
--email "account@example.com" \
--account-name "Production-Account"
Terminal window
# Create policy
aws organizations create-policy \
--type SERVICE_CONTROL_POLICY \
--name "DenyRegions" \
--description "Deny non-approved regions" \
--content file://scp-policy.json
# List policies
aws organizations list-policies \
--filter SERVICE_CONTROL_POLICY
# Attach policy to OU
aws organizations attach-policy \
--policy-id p-xxxx \
--target-id ou-xxxx-xxxx
# Detach policy
aws organizations detach-policy \
--policy-id p-xxxx \
--target-id ou-xxxx-xxxx
# Describe policy
aws organizations describe-policy \
--policy-id p-xxxx

SCP Security Strategy
+------------------------------------------------------------------+
| |
| Layer 1: Organization-Level SCPs |
| +------------------------------------------------------------+ |
| | - Prevent leaving organization | |
| | - Prevent disabling CloudTrail/Config | |
| | - Prevent root account access keys | |
| +------------------------------------------------------------+ |
| |
| Layer 2: OU-Level SCPs |
| +------------------------------------------------------------+ |
| | - Region restrictions | |
| | - Service restrictions | |
| | - Instance type restrictions | |
| +------------------------------------------------------------+ |
| |
| Layer 3: Account-Level SCPs |
| +------------------------------------------------------------+ |
| | - Specific service denies | |
| | - Resource-level restrictions | |
| | - Tag-based restrictions | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Security Accounts Architecture
+------------------------------------------------------------------+
| |
| Security OU |
| +------------------------------------------------------------+ |
| | | |
| | +----------------+ +----------------+ +----------------+ | |
| | | Security Hub | | Audit Account | | Log Archive | | |
| | | Account | | | | Account | | |
| | | | | | | | | |
| | | - Security Hub | | - CloudTrail | | - S3 Logs | | |
| | | - GuardDuty | | - Config Logs | | - Long-term | | |
| | | - Detective | | - Audit Tools | | Retention | | |
| | | - Macie | | - Reports | | - Compliance | | |
| | +----------------+ +----------------+ +----------------+ | |
| | | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Common SCP Issues
+------------------------------------------------------------------+
| |
| Issue 1: "Access Denied" for Admin Actions |
| +------------------------------------------------------------+ |
| | Cause: SCP blocking admin actions | |
| | Solution: Add exception for admin role in SCP | |
| | | |
| | Condition: | |
| | "StringNotEquals": { | |
| | "aws:PrincipalArn": "arn:aws:iam::*:role/AdminRole" | |
| | } | |
| +------------------------------------------------------------+ |
| |
| Issue 2: Cannot Create Resources in New Region |
| +------------------------------------------------------------+ |
| | Cause: Region restriction SCP | |
| | Solution: Update SCP to include new region | |
| +------------------------------------------------------------+ |
| |
| Issue 3: Account Cannot Leave Organization |
| +------------------------------------------------------------+ |
| | Cause: PreventLeaveOrganization SCP | |
| | Solution: Management account must remove account | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Terminal window
# Check effective policy
aws organizations describe-effective-policy \
--policy-type SERVICE_CONTROL_POLICY \
--target-id 123456789012
# List policies attached to OU
aws organizations list-policies-for-target \
--target-id ou-xxxx-xxxx \
--filter SERVICE_CONTROL_POLICY
# Check if policy is attached
aws organizations list-targets-for-policy \
--policy-id p-xxxx

Exam Tip

Key Exam Points
+------------------------------------------------------------------+
| |
| 1. SCPs do NOT grant permissions - they only limit them |
| |
| 2. Management account is NOT affected by SCPs |
| |
| 3. SCPs must have at least one Allow statement to be effective |
| |
| 4. FullAWSAccess SCP is attached by default to all roots/OUs |
| |
| 5. Explicit Deny always overrides Allow |
| |
| 6. AWS Organizations is FREE (no additional charges) |
| |
| 7. Consolidated Billing provides volume pricing benefits |
| |
| 8. Control Tower = Organizations + Config + CloudFormation |
| |
| 9. Guardrails = Preventive (SCPs) + Detective (Config Rules) |
| |
| 10. Account Factory automates account creation |
| |
+------------------------------------------------------------------+

Chapter 26 Summary
+------------------------------------------------------------------+
| |
| AWS Organizations |
| +------------------------------------------------------------+ |
| | - Free service for multi-account management | |
| | - Consolidated billing across accounts | |
| | - Hierarchical structure with OUs | |
| +------------------------------------------------------------+ |
| |
| Service Control Policies |
| +------------------------------------------------------------+ |
| | - Permission boundaries (not grants) | |
| | - Inherit down the OU hierarchy | |
| | - Can deny any action except management account | |
| +------------------------------------------------------------+ |
| |
| Best Practices |
| +------------------------------------------------------------+ |
| | - Use multi-account strategy (not single account) | |
| | - Implement Control Tower for automation | |
| | - Apply defense-in-depth with layered SCPs | |
| | - Separate security, audit, and workload accounts | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Next Chapter: Chapter 27: AWS KMS, Secrets Manager & Parameter Store