Cloud Security Office Hours Banner

Build a multi-account AWS Org with SCPs

Terraform a 3-account organization with IAM Identity Center, baseline guardrail SCPs, and centralized CloudTrail. Real production-shape work.

Walkthrough All Portfolio Projects

· · Vendor-neutral · View source on GitHub

Time: ~6 hours  ·  Difficulty: Intermediate  ·  Stack: AWS · Terraform · IAM Identity Center · SCPs

Most cloud security work in real companies starts at the Org level: account vending, guardrails, federated access. Building a tiny version of that yourself proves you can think at that altitude — which is exactly what hiring managers screen for in mid-level and senior interviews.

The artifact is a public Terraform repo that, given a fresh AWS account, will provision a minimal-but-real production-shaped organization in 15 minutes. Hiring managers love this one.

📖 On this page

  1. What you'll have at the end
  2. Prerequisites
  3. Step-by-step
  4. What hiring managers look for
  5. Common mistakes
  6. Where to publish
  7. Where next

What you'll have at the end

Prerequisites

Step-by-step

1. Plan the account layout on paper first

Sketch it: management, workload-prod, workload-dev, audit. (You can collapse workload-prod/dev for cost.) Decide which account owns CloudTrail, which OU each account lives in, and which SCPs apply at the OU vs root level.

2. Bootstrap the management account

In the management account, enable AWS Organizations and create a Terraform IAM user (or, better, a role assumed via federated SSO). Store its credentials in ~/.aws/credentials as a named profile.

3. Terraform the OU structure

Create three OUs: Workloads, Audit, Sandbox. The aws_organizations_organizational_unit resource is what you want.

resource "aws_organizations_organization" "this" {
  feature_set = "ALL"
  enabled_policy_types = ["SERVICE_CONTROL_POLICY"]
}

resource "aws_organizations_organizational_unit" "workloads" {
  name      = "Workloads"
  parent_id = aws_organizations_organization.this.roots[0].id
}

4. Create the member accounts

Use aws_organizations_account to create the workload and audit accounts. AWS issues each one a unique email (use Gmail's + aliasing or a catch-all).

5. Write your first SCP

Start with deny root user activity — the simplest non-trivial guardrail. Then add: deny disabling CloudTrail, deny regions other than us-east-1, require IMDSv2 on EC2 launches, require MFA for sensitive actions. Apply at the Workloads OU.

6. Set up IAM Identity Center

Enable Identity Center in the management account, create one permission set called AdminAccess, create one user (yourself), and assign that user to one account via the permission set. Sign in to the user portal and confirm SSO works end-to-end.

7. Centralize CloudTrail in the audit account

Enable an organization trail from the management account writing to a bucket in the audit account. Configure the bucket with object-lock (compliance mode, short retention so you can delete the lab later) and bucket policies that prevent deletion.

8. Test the guardrails by trying to violate them

Sign into a workload account, try to launch an instance in a forbidden region, try to disable CloudTrail, try to launch with IMDSv1. The SCPs should block each one. Screenshot every denial.

9. Document the design decisions

In the README: why three accounts? Why these SCPs? What's the threat model each one addresses? What would you add for production? What did you skip and why? This is the section hiring managers actually read.

10. Tear down (or keep)

This lab can stay running cheaply if you keep CloudTrail volume low — the org itself costs nothing. Or destroy when done; closing accounts in Organizations takes 90 days though, so factor that in.

What hiring managers look for

Common mistakes

Where to publish

The full publishing playbook is on the portfolio hub page. The short version: a public GitHub repo with a thorough README is the strongest single signal; pair it with a LinkedIn post and (optionally) a 5-minute lightning talk at a CSOH Friday Zoom.

Where next