Skip to Content
Cloud Engineering Academy
Projects

Capstone 7: Secure multi-account landing zone (lite)

The foundation a bank builds before anything else, without Control Tower: a multi-account AWS Organization with tested service control policies, a central log archive with Object Lock queried by Athena, central GuardDuty, Security Hub and Access Analyzer, IAM Identity Center access by group, and budgets, all as Terraform, built on the Module 15 guardrails lab.

advanced⏱ 12 h 🟡 Low costSAP-C03SCS-C03SOA-C03

Assumes: AWS Organizations · SCPs · IAM Identity Center · CloudTrail (organisation trail) · AWS Config · GuardDuty · Security Hub · IAM Access Analyzer · Athena · Terraform 1.10+ with AWS provider 6.x · .NET 10 LTS (tests) · AWS CLI v2 · Region us-east-1. Verified against official sources on 2026-11-18.

What you are building

The multi-account foundation for the fictional Harbourline Bank. "Lite" means no AWS Control Tower, seven accounts, a handful of guardrails and Terraform you can read in an evening. It shows the ideas Control Tower automates, so you understand what you would be buying.

  1. An organisation layout: a management account with no workloads, a Security OU (log archive, security tooling), an Infrastructure OU, Workloads split into Prod and NonProd, a Sandbox OU and a Suspended OU that denies everything.
  2. Guardrails as service control policies: the Module 15 lab's baseline set plus two more written here, one that protects the landing zone itself (the log bucket, detection settings and the automation roles) and one for data (public access block, EBS and RDS encryption). All of it is tested offline by an SCP evaluator.
  3. A central log archive: an organisation CloudTrail trail and AWS Config delivering to a KMS-encrypted, versioned, Object-Locked bucket in its own account, queried with Athena.
  4. Central security tooling: GuardDuty, Security Hub, a Config aggregator and Access Analyzer administered from one account, with serious findings sent to an encrypted SNS topic.
  5. People and cost: IAM Identity Center with four groups and four permission sets, a break-glass role that alarms, and budgets per account.
  6. A per-account baseline that makes safe settings the default before any guardrail is attached.

This capstone changes a real organisation

It is the only capstone that does. Use a sandbox organisation you can afford to break, never an employer's. The SCPs are off by default and attach only to the Sandbox OU first, the account baseline runs before any guardrail is attached, and a tested break-glass path comes before everything else. Nothing here makes an organisation compliant with any regulation, nothing was deployed to AWS when this page was written, and all data and account numbers are fictional.

Learning objectives

By the end you can:

  • Explain why a bank uses many accounts and what each of the seven accounts is for.
  • State what an SCP can and cannot do: it never grants access, and it does not restrict the management account or service-linked roles.
  • Write an SCP with resource and condition scoping, and a failing test for it before the policy.
  • Explain why exempting a role by name is safe only if creating and editing that role is also restricted.
  • Prove audit logs were not altered (digest files, Object Lock, a separate account) and find a denied action in the archive with Athena.
  • Say why CloudTrail Lake and Audit Manager are not in the design and what replaces each.
  • Order a deployment and a teardown so that guardrails never lock you out of the roles they protect.

The architecture

The repository adds the sequence for one risky action, from API call to alert, and the five guardrail layers (organisation, preventive SCPs, account baseline, detective, people and cost) in projects/p7-landing-zone-lite/docs/architecture.md.

One risky action, end to end

An engineer in a production account tries cloudtrail:StopLogging. The SCP evaluation along Root, Workloads, Prod and the account returns an explicit deny. The denied call is still recorded by the organisation trail, delivered to a bucket no member account can modify, with a digest file so tampering is detectable. An Athena query over the archive then finds the denial. The denial is the interesting evidence.

People and access

GroupPermission setWhere it applies
hl-readersReadOnlyAll accounts
hl-developersDeveloperNon-production accounts only
hl-security-auditorsSecurityAuditAll accounts
hl-breakglassBreakGlassAdmin (one-hour sessions)Production accounts only; a very small group, every use alarms

Assignments are to groups, never individuals, so joiners and leavers are an identity-source change rather than an AWS change.

Prerequisites and the lessons it builds on

What is in the repository

WhereWhat
labs/m15-org-guardrailsThe SCP engine, linter, validator, hl-org tool, the base policies and the Terraform that creates the OUs and base SCPs. Referenced, not copied; apply it first
projects/p7-landing-zone-lite/org, policiesThe organisation layout and the two extra SCPs (protect the landing zone; data guardrails)
projects/p7-landing-zone-lite/tests31 tests proving the guardrails, including resource-scoped and condition-scoped denials and the two exempt roles
projects/p7-landing-zone-lite/scripts/validate-design.shMerges the lab's policies and this project's and runs the lab's validator in Docker
projects/p7-landing-zone-lite/infra/terraformFour roots: log-archive, management, security-tooling, account-baseline
projects/p7-landing-zone-lite/queriesAthena table definition and investigation queries: untested templates
projects/p7-landing-zone-lite/docsArchitecture, five ADRs, security controls, testing, monitoring, cost and teardown

The five ADRs: a lite landing zone instead of Control Tower, a central log archive with Athena instead of CloudTrail Lake, the account baseline and guardrails, Identity Center groups and permission sets, and central security tooling with evidence collected without Audit Manager.

Two services you will not find here

CloudTrail Lake stopped taking new customers on 2026-05-31, so the archive is S3 queried with Athena. AWS Audit Manager has not accepted new onboarding since 2026-04-30, so evidence comes from Config, Security Hub standards, CloudTrail and Athena. Both dates come from this course's research notes; re-check them against the AWS documentation before relying on them ⚠ VERIFY.

Build path

Run the guardrail tests and the validator (free). The lab's tests, this project's 31 tests, and the design validator. Read the one warning it prints and explain why it is intended.

Write a guardrail test-first (free). Add your own SCP, write a failing test for what it must deny and what it must still allow, then make it pass.

Read the Terraform and the ADRs (free). Run terraform validate on each of the four roots and trace one risky action through the layers.

Deploy in a sandbox organisation. Apply the lab's OU Terraform, create the log-archive and security-tooling accounts by hand, enable trusted access, then apply account-baseline in each account, then log-archive, management, security-tooling, in that order.

Attach the guardrails to the Sandbox OU only and prove them. Make a denied call, find it in the archive with Athena, find a Security Hub finding, delete a locked log object (it should fail), use the break-glass path and watch the alarm.

Tear down in the documented order: detach the SCPs first, then security tooling, the baselines, management and finally the log archive. Prove nothing is left.

What was verified when this page was written

CheckResult
Module 15 lab suite (Docker, .NET 10 SDK)50 passed, 0 failed
This project's guardrail suite31 passed, 0 failed
scripts/validate-design.shNo errors, one warning (the intended unconditional deny in the Suspended OU's policy); a stop-CloudTrail attempt in payments-prod is DENIED by the baseline policy and an ordinary read in an approved Region is ALLOWED
terraform validate on all four roots (Terraform 1.14, AWS provider 6.x)Valid
Not runterraform apply of any root, any real organisation, trail, bucket, GuardDuty, Security Hub or Identity Center, the Athena queries (templates), the CLI commands in the deployed test plan. The SCP evaluator models a subset of IAM (no RCPs, no ForAnyValue or ForAllValues, no policy variables), so confirm important guardrails in a real test account. Prices, service availability and several CLI details are marked ⚠ VERIFY in the repository docs

Security controls

The repository's docs/security-controls.md lists fifteen controls, each with where it lives, how to verify it and what evidence to keep. The ones that define this design:

ControlHow it is shown
Workloads never run in the management accountSCPs do not apply to it, so it holds only the organisation, the trail, Identity Center and budgets, with a tiny access list
The audit trail is on everywhere and tamper-evidentOrganisation trail, multi-Region, log-file validation, KMS, delivered to a separate account; validate-logs over a window
The archive resists deletionObject Lock, versioning, TLS-only policy, Block Public Access, writes only by CloudTrail and Config for this organisation
Nobody in a member account can weaken the archive or detectionscp-protect-landing-zone, proved by unit tests and, in a sandbox, an explicit-deny error
Exemptions cannot be forgedThe same SCP denies creating or editing the two exempt roles, so claiming the name is not enough
No long-lived human credentialsIAM users and access keys denied; people use Identity Center with short sessions
Serious findings reach a personHigh and critical findings go to an encrypted SNS topic
Everything is code, taggedTerraform with provider default_tags; terraform plan shows no drift

Honest gaps: Object Lock in GOVERNANCE mode with one day of retention and force_destroy buckets (production uses COMPLIANCE mode and the legally required retention), an administrator deployer role, local Terraform state, no Control Tower or account vending (design only), no resource control policies or data perimeter, no data events on the trail, and a single home Region. The management account is outside SCP control, and the break-glass path is a deliberate hole that is mitigated, not removed.

Cost and teardown

A rehearsal destroyed the same day costs roughly USD 0.10 to 1. Left running, a lite landing zone of seven accounts at low activity costs roughly USD 10 to 40 a month, mostly AWS Config and GuardDuty, which scale with activity. Organizations, SCPs, Identity Center and the Config aggregator itself cost nothing. Security Hub pricing changed recently, so check the current page. Prices are list-price estimates dated 2026-11-18, not re-fetched from the pricing pages ⚠ VERIFY.

Teardown checklist

Detach the SCPs first so you can still edit the roles and buckets they protect, then destroy in the order security tooling, account baselines (each account), management, log archive. Never switch Object Lock to COMPLIANCE mode in the lab: nobody can shorten that retention and the account cannot be closed cleanly. Closed accounts linger for 90 days, so move test accounts to the Suspended OU first. Then run the tag query for Project=cea-lab and Lab=p7-landing-zone-lite. The repository's docs/cost-and-teardown.md has the ordered commands.

Acceptance criteria

  • The lab's 50 tests and this project's 31 tests pass; the validator reports no errors.
  • You wrote one new SCP with a failing test first.
  • The account baseline ran in every account before any guardrail was attached.
  • A tamper attempt was denied in a real sandbox account and then found in the archive with Athena.
  • An attempt to delete a locked log object failed, and validate-logs succeeded.
  • Break-glass works, alarms, and the recovery path (the management account detaches the policy) was tested.
  • Teardown followed the documented order and the tag query returned an empty list.

Portfolio-ready checklist

The full list is projects/p7-landing-zone-lite/checklist.md. The essentials:

  • Five ADRs with the rejected alternatives, including why Control Tower is the default and when you would still build your own.
  • The account map, the log and finding flow, and the guardrail layers as diagrams that match what you built.
  • Evidence: test results, the denied call and its Athena record, the lock configuration, the member lists for each detection service.
  • A clear statement of what is real, tested code and what is design only (account vending, the Athena queries).
  • Extensions: remote state per account with native locking, a vending pipeline that runs the baseline before moving an account, resource control policies and a data perimeter, a second Region for the archive, scoped permissions for the deployer role.

Exercises

🟢 Guided. In org/landing-zone-lite.json, move the payments-nonprod account into the Prod OU and run the validator. Predict what changes about which SCPs apply to it, then check.

🟡 Challenge. Write a new SCP that denies creating an S3 bucket outside the approved Regions except for one named role, with tests for the denied case, the allowed case and the exempt role. Then explain what stops an engineer creating a role with the exempt name.

🔴 Live problem. Ticket SEC-902: "After we attached the guardrails to Workloads, the deployment pipeline could not update a log-forwarding role in payments-prod, and nobody can edit it." Explain the likely cause, the safe way to change the baseline from now on, and the recovery path if the pipeline's own role is locked out.

Interview questions

  1. Design a multi-account strategy for a bank. What goes in each account?
  2. How would you stop an engineer switching off CloudTrail, and what would you still not be protected against?
  3. What does an SCP not protect against?
  4. How do you prove your logs were not altered?
  5. Control Tower or build your own?

Key takeaways

  • Accounts are the strongest boundary AWS offers; the management account is the one SCPs cannot touch, so keep workloads out of it.
  • Preventive, baseline and detective controls do different jobs; no single layer is trusted alone.
  • A denied action is still logged, and a log in another account with Object Lock is evidence.
  • An exemption by name is only as strong as the control over who can create that name.
  • Test guardrails before you attach them, attach them to the sandbox first, and keep a break-glass path you have actually used.

Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.

On this page