Lesson 1: Enterprise Multi-Account Architecture & Service Control Policies (SCPs)
๐ง The Concept (Explain Like Iโm 5)
Imagine an international banking corporation:
- The Single Account Nightmare (The Shared Office): Every employee (500 developers, 20 interns, 10 database admins, and the CEO) works in a single giant open-plan room with one shared filing cabinet. If an intern accidentally spills coffee on the computer (deletes a table in Dev), the entire global bankโs production trading system crashes. If an attacker tricks one junior engineer into clicking a phishing link, the attacker steals the keys to the entire companyโs vault.
- The Multi-Account Model (The Secure Bank Vaults):
Instead of one shared room, the bank constructs 200 completely isolated, bomb-proof vault buildings (AWS Member Accounts):
- Vault #1: Exclusively for Dev Workloads.
- Vault #2: Exclusively for Production Payments.
- Vault #3: Exclusively for Security Audits & Immutable Logs.
- Organizational Units (OUs): Grouping vaults into logical departments (Security OU, Core Infrastructure OU, Workloads OU).
- Service Control Policies (SCPs - The Steel Guardrails):
The bankโs corporate bylaws engraved in stone. Even if an account administrator has โFull Administrator Accessโ (
*:*) inside their member account, an SCP attached to their OU permanently restricts what is physically possible. If the bylaws state: โNo business may be conducted in Antarcticaโ (unapproved AWS regions), even therootuser is physically blocked from launching an EC2 instance in Antarctica!
๐ข The Enterprise Context: Why Single-Account Cloud is Obsolete
In modern cloud platforms, the AWS Account is the ultimate security, billing, and blast-radius boundary:
flowchart TD
subgraph RootManagement ["Root Management Account (Billing & Governance Only)"]
RootAcc["AWS Organizations Root<br/>(Zero Workloads! SSO & Master Billing)"]
end
subgraph SecurityOU ["๐ Security Organizational Unit (OU)"]
SecOUHead["Security OU"]
SecLog["<b>Log Archive Account</b><br/>Immutable S3 WORM Storage<br/>Aggregated CloudTrail & VPC Flow Logs"]
SecTool["<b>Security Tooling Account</b><br/>Delegated Admin for GuardDuty,<br/>Security Hub & AWS Config"]
SecOUHead --> SecLog
SecOUHead --> SecTool
end
subgraph InfraOU ["๐ Core Infrastructure OU"]
InfraOUHead["Infrastructure OU"]
NetHub["<b>Central Networking Account</b><br/>Transit Gateway, Inspection VPC,<br/>Centralized NAT Egress & DirectConnect"]
SharedSvc["<b>Shared Services Account</b><br/>Artifactory, Container Registries,<br/>Golden AMI Builder"]
InfraOUHead --> NetHub
InfraOUHead --> SharedSvc
end
subgraph WorkloadOU ["๐ผ Workloads OU (SDLC Segregation)"]
WorkloadOUHead["Workloads OU"]
DevAcc["Dev Workload Account<br/>(Developers have sandbox freedom)"]
StgAcc["Staging Workload Account<br/>(Pre-production parity)"]
ProdAcc["Production Workload Account<br/>(Zero human access, GitOps only)"]
WorkloadOUHead --> DevAcc
WorkloadOUHead --> StgAcc
WorkloadOUHead --> ProdAcc
end
RootAcc --> SecurityOU
RootAcc --> InfraOU
RootAcc --> WorkloadOU
The 4 Pillars of Enterprise Landing Zones
- Blast Radius Minimization: A security breach, compromised API key, or accidental
terraform destroyin the Dev Account cannot physically touch, see, or affect Production. - Consolidated Billing & FinOps: All 200 member accounts roll their charges into a single master invoice in the Root Management Account. AWS Volume Discounts (e.g. S3 tiered pricing, Enterprise Discount Programs - EDP, Compute Savings Plans) are shared across the entire fleet.
- Delegated Administration: The Root Management Account should be locked in a digital safe with zero day-to-day access. Security services (Security Hub, GuardDuty, Macie, IAM Access Analyzer) designate the Security Tooling Account as the โDelegated Administratorโ, allowing the Infosec team to enforce security cluster-wide without needing access to the root billing account.
- Automated Account Vending: In mature platform engineering organizations, developers do not submit IT tickets waiting weeks for an account. An automated pipeline (AWS Control Tower Account Factory for Terraform - AFT) provisions a fully hardened, compliant AWS account connected to the Transit Gateway in under 15 minutes!
๐ก๏ธ Service Control Policies (SCPs) Under the Hood
An SCP (Service Control Policy) is an organization-wide policy that sets the maximum permissions that any identity (including the root account user) inside an account can ever exercise.
The Authorization Evaluation Logic
When any user, IAM role, or automated pipeline attempts to execute an API call (e.g., ec2:RunInstances), AWS evaluates permissions in strict order:
flowchart TD
Req["Developer / Pipeline calls API: ec2:RunInstances"] --> SCPCheck{"1. Is action permitted by all SCPs in hierarchy?"}
SCPCheck -->|"Explicit Deny in ANY SCP"| Deny["โ ACCESS DENIED (Org Policy Block)"]
SCPCheck -->|"Allowed by SCPs"| BoundaryCheck{"2. Is action permitted by Permissions Boundary?"}
BoundaryCheck -->|"Denied"| Deny
BoundaryCheck -->|"Allowed"| IAMCheck{"3. Does IAM Policy grant permission?"}
IAMCheck -->|"Explicit Deny"| Deny
IAMCheck -->|"No Allow Rule"| Deny
IAMCheck -->|"Explicit Allow"| Success["โ
ACTION ALLOWED"]
[!IMPORTANT] SCPs do NOT grant permissions! They only define the outer boundary. Even if an SCP says
Allow *:*, a user cannot perform any action until an IAM Policy attached to their role explicitly grants it. Conversely, if an SCP has an explicitDeny, no IAM policy on earth can override it.
๐ป Production Manifests: 4 Mandatory Enterprise SCPs
1. Mandatory SCP: Restrict Allowed AWS Regions
Restricts workload deployment to approved geographic zones, instantly satisfying compliance and preventing rogue crypto-mining in unmonitored foreign regions:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyAllOutsideApprovedRegions",
"Effect": "Deny",
"NotAction": [
"iam:*",
"organizations:*",
"route53:*",
"route53domains:*",
"cloudfront:*",
"wafv2:*",
"shield:*",
"support:*",
"trustedadvisor:*"
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"us-east-1",
"us-west-2"
]
}
}
}
]
}
2. Mandatory SCP: Prevent Disabling Security Tooling
Guarantees that rogue developers or compromised administrator credentials cannot disable CloudTrail logging, GuardDuty threat detection, or AWS Config compliance rules:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ProtectSecurityServices",
"Effect": "Deny",
"Action": [
"cloudtrail:StopLogging",
"cloudtrail:DeleteTrail",
"cloudtrail:UpdateTrail",
"guardduty:DeleteDetector",
"guardduty:DisassociateFromMasterAccount",
"guardduty:UpdateDetector",
"config:DeleteConfigRule",
"config:DeleteConfigurationRecorder",
"config:StopConfigurationRecorder"
],
"Resource": "*"
}
]
}
3. Mandatory SCP: Enforce Encryption at Rest on S3
Blocks any employee from creating unencrypted S3 buckets or uploading unencrypted objects:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyUnencryptedObjectUploads",
"Effect": "Deny",
"Action": "s3:PutObject",
"Resource": "*",
"Condition": {
"Null": {
"s3:x-amz-server-side-encryption": "true"
}
}
}
]
}
4. Mandatory SCP: Prevent Member Accounts Leaving the Organization
Prevents a compromised account administrator from detaching the member account from corporate billing and governance:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PreventLeavingOrganization",
"Effect": "Deny",
"Action": [
"organizations:LeaveOrganization"
],
"Resource": "*"
}
]
}
๐๏ธ AWS Control Tower vs. Account Factory for Terraform (AFT)
When implementing an enterprise landing zone at scale, platform teams choose between two core orchestration patterns:
| Dimension | AWS Control Tower (Turnkey Managed) | Account Factory for Terraform (AFT - GitOps) |
|---|---|---|
| Setup Mechanism | Click-to-deploy wizard in AWS Console | Pure Infrastructure as Code (Git + Terraform) |
| Customization | Pre-packaged Guardrails & Landing Zone 3.0 | Infinite: Custom Terraform modules executed per account |
| Account Vending | Via Service Catalog / Console | Triggered automatically by creating a .tf file in Git |
| Pipeline Integration | AWS CodePipeline behind the scenes | Native to GitHub Actions, GitLab CI, or Terraform Cloud |
| Best Suited For | Small-to-medium teams wanting quick compliance | Large Enterprises (50+ accounts) demanding full GitOps |
๐งญ Step-by-Step Operational Playbook: Bootstrapping an Enterprise Landing Zone (From Zero to Production)
If you are handed a brand-new root AWS account at a company and asked to build a secure multi-account Landing Zone, follow this exact step-by-step sequence:
Step 1: Lock Down the Management Root User (First 15 Minutes)
- Plain-English Goal: The Management Account root user has god-mode billing and account-deletion powers. Never use it for daily work.
- Action: Enable phishing-resistant hardware MFA (YubiKey/FIDO2) on the Root email, delete all root access keys, and enable AWS Organizations:
aws organizations create-organization --feature-set ALL aws organizations describe-organization
Step 2: Create the Core Organizational Units (OUs)
- Plain-English Goal: Group accounts like folders on a hard drive (
Security,Infrastructure,Workloads-Prod,Sandbox) so you can attach guardrails to entire folders instead of individual accounts. - Action:
ROOT_ID=$(aws organizations list-roots --query "Roots[0].Id" --output text) aws organizations create-organizational-unit --parent-id "$ROOT_ID" --name "Security" aws organizations create-organizational-unit --parent-id "$ROOT_ID" --name "Infrastructure" aws organizations create-organizational-unit --parent-id "$ROOT_ID" --name "Workloads-Prod"
Step 3: Enable Organization-Wide Service Control Policies (SCPs)
- Plain-English Goal: By default, SCPs are disabled even after creating an Organization. You must explicitly enable the
SERVICE_CONTROL_POLICYpolicy type on the Root ID. - Action:
aws organizations enable-policy-type --root-id "$ROOT_ID" --policy-type SERVICE_CONTROL_POLICY
Step 4: Vend & Quarantine a New Workload Account via Account Factory
- Plain-English Goal: Never create accounts manually by typing credit cards. Use the Organizations API or Control Tower Account Factory for Terraform (AFT) to vend the account and move it into
Workloads-Prod. - Action:
aws organizations create-account \ --email "aws-payments-prod@corp.example.com" \ --account-name "payments-prod"
Step 5: Verify Guardrail Enforcement (Smoke Test)
- Plain-English Goal: Prove to auditors that even an
AdministratorAccessuser inside the new account cannot disable CloudTrail or deploy into unauthorized regions. - Action:
# Assume role into the spoke account and attempt to stop CloudTrail (Must return Explicit Deny!) aws cloudtrail stop-logging --name org-audit-trail --region us-east-1 # Expected Output: An error occurred (AccessDeniedException) when calling the StopLogging operation: with an explicit deny in a service control policy
๐ ๏ธ Real-World Troubleshooting & Failure Modes
1. The Global Service Region Lockout
- Symptom: You apply the โRegion Restriction SCPโ to an OU. Immediately, developers complain they cannot create IAM roles or register domain names.
- Root Cause: Global services (IAM, Route53, CloudFront) operate globally through the
us-east-1endpoint. If your SCP denies all actions outsideeu-west-1and forgets to whitelist global services inNotAction, IAM and DNS API calls are blocked globally! - Fix: Always include
iam:*,organizations:*,route53:*, andcloudfront:*in theNotActionblock of your region-restriction SCP.
2. SCP Inheritance Lockout on Root
- Symptom: An engineer attaches a restrictive SCP directly to the Root Organization. Suddenly, platform automation scripts in the Management Account fail with Access Denied.
- Fix: Never attach experimental SCPs to the Root! Attach SCPs to child OUs (e.g.
Workloads OU), and thoroughly test in a dedicatedSandbox OUbefore applying to production accounts.
๐ Knowledge Check & Real-World Interview Scenarios
An infrastructure administrator logs into Member Account #104 using the accountโs root user credentials. The OU has an SCP attached with Effect: Deny, Action: s3:DeleteBucket.
The administrator claims: โI am logged in as the root user. The root user has absolute unrestricted authority in Linux and AWS, so the SCP cannot block me.โ
Is the administrator correct? Can they delete the S3 bucket? Explain the exact AWS authorization mechanism.
โ Answer & Explanation
The Verdict: The administrator is 100% INCORRECT. They CANNOT delete the S3 bucket.
The Mechanism:
- In standalone AWS accounts, the
rootuser does indeed bypass IAM policies. - However, when an account belongs to an AWS Organization, the authorization engine evaluates Service Control Policies (SCPs) before evaluating the local identity.
- An SCP sets the boundary of possible actions for the entire account. If an SCP explicitly denies
s3:DeleteBucket, that API call is physically disabled across the entire account boundary. - Even the
rootuser and IAM Administrators withAdministratorAccess(*:*) are completely powerless to override an explicit Deny in an SCP.
Why do enterprise security standards mandate that all centralized AWS CloudTrail audit logs must be replicated to a completely dedicated โLog Archiveโ AWS account with S3 Object Lock enabled?
Describe the catastrophic failure mode that occurs if logs are kept inside the production workload account.
โ Answer & Explanation
The Failure Mode (Covering Tracks): If centralized audit logs are stored inside the production workload account, an attacker or disgruntled employee who gains administrative access can:
- Steal customer database records.
- Delete the CloudTrail logs, delete the S3 bucket, or disable logging entirely.
- The forensic team will have zero digital evidence to determine how the breach occurred, what data was exfiltrated, or who was responsible.
The Enterprise Architecture Solution:
- Dedicated Account: Central CloudTrail and VPC Flow Logs are streamed across account boundaries into a dedicated Log Archive Account.
- No Workload Access: Nobody in the company (not even senior developers or operations leads) has write or delete access to this account.
- S3 Object Lock (WORM - Write Once, Read Many): Enforces compliance retention in Compliance Mode. Even AWS Support or root credentials cannot delete or modify log files until the mandatory retention period (e.g., 365 days) has expired!
๐๏ธ Advanced Architecture: Extreme-Scale Landing Zones
[!TIP] Managing 700+ Applications Across Downward Entities?
For the complete enterprise blueprint on orchestrating 700+ applications across subsidiary entities, multi-region Cloud WAN and IPAM networking, 3-tier guardrails (Preventative, Detective, Corrective), JIT break-glass access, and autonomous security incident containment, see the dedicated masterclass:
๐ Enterprise Lesson 7: AWS Landing Zones at Scale (700+ Applications, Guardrails & Incident Management)