Aws Account Baseline Root
What an AWS Account Baseline Actually Contains (and Why It Goes First)
Every multi-account AWS setup has the same chicken-and-egg problem: you can’t deploy workloads until accounts exist, and accounts shouldn’t exist without guardrails. The answer is an account baseline — the first Terraform that runs in every account, before anything else is allowed to land. Here’s what a real one contains, using a root/management-account baseline as the example.
What’s in the baseline
A production account baseline is not one resource — it’s a bundle of security and governance primitives:
- AWS CloudTrail — a trail logging all management (and optionally data) events across all regions, delivering to a dedicated, access-locked S3 bucket. Non-negotiable for forensics and compliance.
- AWS Config — enabled in every region, with a configuration recorder, delivery channel, and managed Config rules (encrypted volumes, restricted SSH ingress, root MFA enabled).
- GuardDuty — threat detection enabled org-wide from the management account, with member accounts auto-associated.
- IAM baseline — password policy (length, rotation, complexity), IAM groups mapped to job functions, and — critically — no IAM users for humans; human access goes through your IdP/SSO.
- Cross-account IAM roles — roles that let the management account and CI/CD assume into child accounts, so nobody holds long-lived child-account credentials.
- EBS encryption by default — account-level setting so no one can accidentally create an unencrypted volume.
- Private S3 bucket defaults — public access block enabled on the buckets the baseline itself creates (logs, config snapshots).
Why root is special
The management (root) account baseline additionally owns the organization structure: the OUs, service control policies, and the AWS Organizations resources themselves:
Root
+- SCP: deny leave-organization, restrict regions
+- OU: security -> log archive, audit tooling
+- OU: infrastructure -> networking, shared services
+- OU: workloads -> dev / staging / prod accounts
Applying the baseline to root first means every subsequently created account inherits SCPs automatically and gets its own baseline applied as part of vending — governance isn’t a retrofit.
The ordering trick
Baselines have dependencies: Config needs its S3 bucket, CloudTrail needs its bucket, and both buckets need public-access-block before delivery starts. Expressing this as one module with explicit dependencies — rather than ad-hoc console setup — is what makes “new account” a code review instead of a wiki checklist.
The demo recording shows the root baseline being applied — the run creates the trail, the config recorder, GuardDuty, and the IAM scaffolding in a single apply.
Takeaway
If you interview for “cloud foundations”-style roles, this is the artifact to know cold: CloudTrail + Config + GuardDuty + IAM guardrails + SCPs, codified, applied before the first workload account exists. Everything else in a landing zone builds on top of it.