Landing-zone automation overview
Understand what AWS Control Tower, Account Factory, Account Factory for Terraform and Customizations for Control Tower each automate, design a Harbourline landing zone on paper, and validate account requests with a tested C# check before anything is provisioned.
Assumes: .NET 10 LTS · xUnit v3 4.0.3 · AWS Control Tower (landing zone, controls, Account Factory) · AFT · CfCT · AWS CLI v2 · Home Region us-east-1. Verified against official sources on 2026-11-18.
Learning objectives
By the end of this lesson you can:
- Explain what a landing zone is and which AWS services AWS Control Tower orchestrates to build one.
- Describe the three kinds of Control Tower controls and how each is implemented (SCPs and RCPs, AWS Config rules, CloudFormation Hooks).
- Distinguish the four ways to automate accounts and baselines: the console Account Factory, Account Factory for Terraform (AFT), Account Factory Customization (AFC) blueprints, and Customizations for Control Tower (CfCT).
- Sketch a Harbourline organization: OUs, shared accounts, controls and an account-request workflow driven from Git.
- Validate a batch of account requests with a tested C# program, the same checks you would run in CI before an AFT pull request merges.
- State honestly what Control Tower costs, what it does not do, and when you might not use it.
This is a design-only lesson. You build a real landing zone in Module 15: Governance and FinOps; here you learn the shapes so you can read, review and automate one.
Prerequisites
- Terraform state: the state bucket and tooling account idea.
- Policy-as-code and secure deployment: pipeline roles and checks.
- Boundaries, SCPs, RCPs and resource policies and Multi-account networking.
- Environment separation: why one account per environment.
- Tools: Docker Desktop for the C# tests. No AWS account is needed.
Why this matters in banking
A bank does not run in one AWS account. Production and non-production are separated so that a developer mistake cannot reach customer data. Audit logs live in an account that engineers cannot edit. The network team owns a shared account for connectivity. Each business line gets its own accounts so cost and access can be attributed.
Creating those accounts by hand does not scale. By the fifteenth account somebody forgets to turn on CloudTrail, forgets to block a Region the bank may not use for data, or creates the root mailbox on a personal address. A landing zone is the answer: a prepared, governed multi-account environment where every new account starts from the same secure baseline, automatically.
Infrastructure as code matters here more than anywhere. The landing zone is the foundation for everything else, so changes to it must be reviewed, repeatable and traceable. The goal of this lesson is to see which parts are managed for you by Control Tower, which parts you automate as code, and where a mistake is most expensive.
The idea in plain language
A landing zone is a well-organised multi-account AWS environment: a hierarchy of organizational units (OUs) containing accounts, with guard-rails applied at the OU level and shared accounts for logging and security.
AWS Control Tower is the AWS service that builds and governs a landing zone for you. It does not invent new technology; it orchestrates existing services: AWS Organizations (the account hierarchy and SCPs), AWS Service Catalog (the account template), AWS IAM Identity Center (single sign-on) and others such as AWS Config and AWS CloudTrail. You get a dashboard, a library of controls, and an Account Factory to create new accounts.
Analogy: a landing zone is a new business park. Control Tower is the park's management company. It has already laid roads, fitted security cameras and fire doors (the shared accounts and controls), and publishes house rules for every unit (the controls). Account Factory is the leasing office: when a new tenant arrives, it hands over a unit built to the standard fit-out, in the right building (OU), with the alarms already wired.
What problem the services solve
| Need | Service or feature | What it does |
|---|---|---|
| Group accounts and apply rules to groups | AWS Organizations (OUs, SCPs, RCPs) | The hierarchy and the deny-style guard-rails |
| A secure starting layout | Control Tower landing zone | Creates the structure, shared accounts, central logging and baseline controls |
| Ongoing rules | Control Tower controls | Preventive, detective and proactive guard-rails, each with a guidance level |
| Standardised new accounts | Account Factory | A configurable account template built on Service Catalog |
| Accounts from Git using Terraform | Account Factory for Terraform (AFT) | A Terraform pipeline that provisions and customises accounts from account-request files |
| Standard resources in every new account | Account Factory Customization (AFC) blueprints | A Service Catalog product (CloudFormation or Terraform) applied during provisioning |
| Extra templates and SCPs across the organization | Customizations for Control Tower (CfCT) | A pipeline driven by a manifest that deploys CloudFormation StackSets and SCPs/RCPs |
| Detect changes to the landing zone itself | Control Tower drift detection | Reports divergence from the expected landing-zone configuration |
The three kinds of control
| Kind | Mechanism | When it acts | Example idea |
|---|---|---|---|
| Preventive | SCPs and RCPs | Denies the API call before it happens | Disallow changes to log archive bucket policies |
| Detective | AWS Config rules | Detects after the fact and reports | Detect unencrypted EBS volumes attached to instances |
| Proactive | CloudFormation Hooks | Blocks a non-compliant resource before CloudFormation creates it | Reject a template whose resource would break a rule |
Each control also has guidance: mandatory (always on, cannot be changed), strongly recommended or elective. You can change the strongly recommended and elective controls from the console or the APIs.
Honest limitations:
- Control Tower sets up in a home Region that you choose at the start. Plan this carefully; changing it later is not a simple setting ⚠ VERIFY the current guidance before you commit.
- Control Tower manages some Organizations, Config and IAM resources on your behalf. Do not edit them by hand: you create drift, and updating the landing zone may fail until you repair it.
- AFT, AFC and CfCT are overlapping ways to customise accounts. Pick one primary approach per concern, or you will fight yourself.
- AFT is for provisioning and customising accounts, not for deploying application resources such as EC2 instances; AWS says so explicitly. Application infrastructure belongs in your own pipelines (the rest of this module).
- Control Tower has no extra charge, but the services it turns on do (see Cost).
Microsoft / Azure comparison
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
| Management groups and subscriptions | AWS Organizations: OUs and accounts | An AWS account is the hard security and billing boundary; there is no deeper nesting of resource groups for isolation |
| Azure Landing Zones (ALZ) and Azure Policy initiatives | Control Tower landing zone and controls | Control Tower is a managed service with a console; ALZ is a reference architecture you deploy as code |
| Azure Blueprints (deprecated) and subscription vending | Account Factory, AFT, AFC blueprints | AFT is the GitOps path: a pull request creates an account |
| Azure Policy deny effect | SCPs and RCPs | SCPs cap what principals can do; they never grant permissions |
| Azure Policy audit effect | AWS Config rules (detective controls) | Evaluated by Config; costs per evaluation |
| Entra ID and PIM for admin access | IAM Identity Center with permission sets | Identity Center is the front door to all accounts |
| Defender for Cloud regulatory initiatives | Security Hub standards (see Module 5) | Separate from Control Tower; Control Tower controls are not a compliance certificate |
Architecture
A Harbourline organization drawn as design only. Names are fictional.
Security-boundary view. Preventive controls (SCPs) attach to OUs and apply to every account below them, including the account root users in member accounts. The management account is not restricted by SCPs, which is why you keep workloads out of it and protect it with the strongest access rules. The Log Archive account holds logs that workload accounts can write but not delete or alter; the Audit account gives security teams read access across the organization without handing out production credentials.
The account-vending flow with AFT
Step-by-step implementation
This is the design process. In Module 15 you run it for real.
Decide the OU structure and who owns each account
Sketch the OUs and the shared accounts on paper. Keep it shallow and drive it from guard-rail needs: put accounts in the same OU only if the same rules apply. A common start is Security, Infrastructure, Workloads-NonProd, Workloads-Prod and Sandbox.
Choose the home Region and governed Regions
Pick one home Region (Harbourline uses us-east-1 in this course) and list the Regions where you will let workloads run. For a UK bank you would normally also govern a UK Region and restrict the rest, but the legal basis for any Region choice is a compliance decision, not a technical one.
Choose the controls per OU
Start with the mandatory controls, add the strongly recommended ones, and add elective ones deliberately (for example a Region deny control for the Workloads OUs). Write down who owns each choice and why.
Choose how accounts get vended
For a C# or CloudFormation shop: console Account Factory plus AFC blueprints, or CfCT. For a Terraform shop: AFT. Whichever you pick, make Git the source of truth for account requests and require review.
Put the checks in front of the request
Validate the request in CI before a human reviews it (the C# code below). Reject a bad name, a wrong OU or a duplicate mailbox in seconds, not after the account exists. An account cannot simply be deleted: closing an account is a slow, constrained process ⚠ VERIFY current AWS account-closure rules.
Plan what the baseline contains
Decide the standard resources every account gets (an IAM role for the pipeline, a CDK or Terraform bootstrap, budget alarms, log settings) and deliver them with AFC blueprints, AFT customizations or CfCT. Keep application resources out of the baseline.
AWS Console instructions
You do not create anything in this lesson, but you should know where things live. If your organization already has Control Tower (not in a personal sandbox), look, do not touch:
- Console → AWS Control Tower → Dashboard: the landing zone version, OUs, enrolled accounts, enabled controls, and noncompliant resources.
- Control Tower → Organization: the OU and account tree.
- Control Tower → Controls library: every control with its type (preventive, detective, proactive) and guidance (mandatory, strongly recommended, elective). Enabled controls shows where each is applied.
- Control Tower → Account Factory: the template used to create and enrol accounts, with the option to customise with a blueprint (AFC).
- Control Tower → Landing zone settings: the home Region, governed Regions and version, and whether an update is available.
- Console → AWS Organizations → AWS accounts: the same hierarchy, from the Organizations side, including SCPs attached to each OU.
If you do not have access, read the AWS Control Tower "Getting started" page and look at screenshots in the AWS documentation. Doing the design exercise needs no account.
AWS CLI
Read-only commands you can run in an organization that already has Control Tower, from the management account with an appropriate read role. They show how the landing zone looks as data. ⚠ VERIFY each command and parameter against the current AWS CLI reference before relying on it.
# The landing zone and its status
aws controltower list-landing-zones --profile hl-management --region us-east-1
# The organization tree: roots, OUs, accounts
aws organizations list-roots --profile hl-management
aws organizations list-organizational-units-for-parent --parent-id r-examplerootid --profile hl-management
aws organizations list-accounts-for-parent --parent-id ou-examplerootid-exampleouid --profile hl-management
# Which controls are enabled on an OU
aws controltower list-enabled-controls \
--target-identifier arn:aws:organizations::444455556666:ou/o-exampleorg/ou-examplerootid-exampleouid \
--profile hl-management --region us-east-1
# SCPs attached to an OU
aws organizations list-policies-for-target --target-id ou-examplerootid-exampleouid --filter SERVICE_CONTROL_POLICY --profile hl-managementAccount IDs, OU IDs and organization IDs above are fictional placeholders.
Infrastructure as Code
Three artefacts describe the same landing zone as code: an AFT account request (Terraform), a CfCT manifest (YAML) and a StackSet baseline (CDK in C#, or any CloudFormation tool).
# One file per account, committed to the AFT account-request repository. A merge triggers provisioning.
# Names and emails are fictional. ⚠ VERIFY the exact module and attribute names against the AFT documentation.
module "hl_payments_dev" {
source = "./modules/aft-account-request"
control_tower_parameters = {
AccountEmail = "hl-payments-dev@aws.harbourline.example"
AccountName = "hl-payments-dev"
ManagedOrganizationalUnit = "Workloads-NonProd"
SSOUserEmail = "cloud-platform@aws.harbourline.example"
SSOUserFirstName = "Cloud"
SSOUserLastName = "Platform"
}
account_tags = {
Owner = "payments-platform"
CostCentre = "CC-4821"
Environment = "dev"
}
change_management_parameters = {
change_requested_by = "payments-platform"
change_reason = "Development account for the Accounts API (ticket CHG-1042)"
}
account_customizations_name = "workload-baseline" # folder in the AFT customizations repository
}Which one should you use?
| Situation | A reasonable default |
|---|---|
| Terraform-first platform team, many accounts, GitOps for account requests | AFT for account vending and customizations |
| CloudFormation or CDK shop, wants a console-driven, fairly light approach | Console Account Factory with AFC blueprints |
| Need to roll out templates and SCPs across existing OUs on a schedule | CfCT, or service-managed StackSets |
| Need a different organisation design than Control Tower expects, or full custom control | Build on AWS Organizations directly, or evaluate the AWS Landing Zone Accelerator solution ⚠ VERIFY; accept that you now own more |
Two practical points. First, the bootstrap of each new account (for CDK, cdk bootstrap; for Terraform, a role the pipeline can assume) is itself a customization, and the CDK documentation notes you can deploy the bootstrap template with StackSets or Control Tower. Second, treat the landing zone repository as tier-zero: smaller group of reviewers, mandatory approvals and no direct pushes to the main branch.
Complete code
An account-request validator you can run in CI before a human reviews an AFT pull request. It encodes decisions your organization has already made: naming, mailbox domain, which environment is allowed in which OU, ownership and cost centre. It runs with no AWS account. Create a folder with these four files and run the tests.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit.v3" Version="4.0.3" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
</Project>{
"sdk": {
"version": "10.0.100",
"rollForward": "latestFeature"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}using System.Text.RegularExpressions;
namespace Harbourline.LandingZone;
/// <summary>The fields a team supplies when asking for a new AWS account (the same data an AFT account request carries).</summary>
public sealed record AccountRequest(
string Name,
string Email,
string OrganizationalUnit,
string Environment,
string Owner,
string CostCentre);
/// <summary>
/// Checks an account request in CI, before a human reviews it and before Account Factory runs.
/// Every rule here is a decision the bank has already made, written down so it is enforced the same way every time.
/// </summary>
public static partial class AccountRequestValidator
{
// Which environment each organizational unit may hold.
private static readonly Dictionary<string, string[]> OuEnvironments = new(StringComparer.Ordinal)
{
["Sandbox"] = ["dev"],
["Workloads-NonProd"] = ["dev", "test"],
["Workloads-Prod"] = ["prod"],
};
private const string EmailDomain = "@aws.harbourline.example";
[GeneratedRegex("^hl-[a-z0-9]+(-[a-z0-9]+)*$")]
private static partial Regex NamePattern();
[GeneratedRegex(@"^CC-\d{4}$")]
private static partial Regex CostCentrePattern();
/// <summary>Returns readable problems for one request. Empty means acceptable.</summary>
public static IReadOnlyList<string> Validate(
AccountRequest request,
IReadOnlySet<string> existingNames,
IReadOnlySet<string> existingEmails)
{
var problems = new List<string>();
if (!NamePattern().IsMatch(request.Name) || request.Name.Length is < 6 or > 40)
{
problems.Add("Name must be 6-40 characters: 'hl-' then lowercase letters, digits and single hyphens.");
}
if (existingNames.Contains(request.Name))
{
problems.Add($"Account name '{request.Name}' already exists.");
}
var email = request.Email.Trim().ToLowerInvariant();
if (!email.EndsWith(EmailDomain, StringComparison.Ordinal) || email.Contains('+', StringComparison.Ordinal))
{
problems.Add($"Email must be a shared mailbox at {EmailDomain} with no '+' alias.");
}
if (existingEmails.Contains(email))
{
problems.Add("This email is already used by another account (AWS requires a unique root email per account).");
}
if (!OuEnvironments.TryGetValue(request.OrganizationalUnit, out var allowedEnvironments))
{
problems.Add($"Unknown organizational unit '{request.OrganizationalUnit}'. Use {string.Join(", ", OuEnvironments.Keys)}.");
}
else if (!allowedEnvironments.Contains(request.Environment))
{
problems.Add($"Environment '{request.Environment}' is not allowed in OU '{request.OrganizationalUnit}' (allowed: {string.Join(", ", allowedEnvironments)}).");
}
if (string.IsNullOrWhiteSpace(request.Owner))
{
problems.Add("Owner is required: a named team, not a person's name.");
}
if (!CostCentrePattern().IsMatch(request.CostCentre))
{
problems.Add("CostCentre must look like CC-1234.");
}
return problems;
}
/// <summary>Validates a batch and also catches duplicates inside the batch itself.</summary>
public static IReadOnlyList<string> ValidateBatch(
IReadOnlyList<AccountRequest> requests,
IReadOnlySet<string> existingNames,
IReadOnlySet<string> existingEmails)
{
var problems = new List<string>();
foreach (var request in requests)
{
problems.AddRange(Validate(request, existingNames, existingEmails).Select(p => $"{request.Name}: {p}"));
}
foreach (var group in requests.GroupBy(r => r.Name).Where(g => g.Count() > 1))
{
problems.Add($"{group.Key}: appears {group.Count()} times in this batch.");
}
foreach (var group in requests.GroupBy(r => r.Email.Trim().ToLowerInvariant()).Where(g => g.Count() > 1))
{
problems.Add($"{group.Key}: used by {group.Count()} requests in this batch.");
}
return problems;
}
}using Harbourline.LandingZone;
namespace Harbourline.LandingZone.Tests;
public class AccountRequestValidatorTests
{
private static readonly IReadOnlySet<string> NoNames = new HashSet<string>();
private static readonly IReadOnlySet<string> NoEmails = new HashSet<string>();
private static AccountRequest Good() => new(
Name: "hl-payments-dev",
Email: "hl-payments-dev@aws.harbourline.example",
OrganizationalUnit: "Workloads-NonProd",
Environment: "dev",
Owner: "payments-platform",
CostCentre: "CC-4821");
[Fact]
public void A_complete_request_is_accepted()
{
Assert.Empty(AccountRequestValidator.Validate(Good(), NoNames, NoEmails));
}
[Theory]
[InlineData("payments-dev")]
[InlineData("hl-Payments")]
[InlineData("hl--double")]
[InlineData("hl-")]
public void Bad_names_are_rejected(string name)
{
var problems = AccountRequestValidator.Validate(Good() with { Name = name }, NoNames, NoEmails);
Assert.Contains(problems, p => p.StartsWith("Name must be", StringComparison.Ordinal));
}
[Theory]
[InlineData("someone@gmail.com")]
[InlineData("hl-payments+dev@aws.harbourline.example")]
public void Emails_must_be_shared_mailboxes_in_the_bank_domain(string email)
{
var problems = AccountRequestValidator.Validate(Good() with { Email = email }, NoNames, NoEmails);
Assert.Contains(problems, p => p.StartsWith("Email must be", StringComparison.Ordinal));
}
[Fact]
public void Duplicate_name_and_email_are_rejected()
{
var names = new HashSet<string> { "hl-payments-dev" };
var emails = new HashSet<string> { "hl-payments-dev@aws.harbourline.example" };
var problems = AccountRequestValidator.Validate(Good(), names, emails);
Assert.Contains(problems, p => p.Contains("already exists", StringComparison.Ordinal));
Assert.Contains(problems, p => p.Contains("already used", StringComparison.Ordinal));
}
[Theory]
[InlineData("Workloads-Prod", "dev")]
[InlineData("Sandbox", "prod")]
[InlineData("Workloads-NonProd", "prod")]
public void Environment_must_match_the_organizational_unit(string ou, string environment)
{
var problems = AccountRequestValidator.Validate(
Good() with { OrganizationalUnit = ou, Environment = environment }, NoNames, NoEmails);
Assert.Contains(problems, p => p.Contains("is not allowed in OU", StringComparison.Ordinal));
}
[Fact]
public void Unknown_ou_is_rejected()
{
var problems = AccountRequestValidator.Validate(Good() with { OrganizationalUnit = "Security" }, NoNames, NoEmails);
Assert.Contains(problems, p => p.StartsWith("Unknown organizational unit", StringComparison.Ordinal));
}
[Fact]
public void Missing_owner_and_bad_cost_centre_are_rejected()
{
var problems = AccountRequestValidator.Validate(Good() with { Owner = " ", CostCentre = "4821" }, NoNames, NoEmails);
Assert.Contains(problems, p => p.StartsWith("Owner is required", StringComparison.Ordinal));
Assert.Contains(problems, p => p.StartsWith("CostCentre must look like", StringComparison.Ordinal));
}
[Fact]
public void Duplicates_inside_one_batch_are_caught()
{
var batch = new[] { Good(), Good() };
var problems = AccountRequestValidator.ValidateBatch(batch, NoNames, NoEmails);
Assert.Contains(problems, p => p.Contains("appears 2 times", StringComparison.Ordinal));
Assert.Contains(problems, p => p.Contains("used by 2 requests", StringComparison.Ordinal));
}
}Run in Docker (fourteen tests pass), then remove bin/ and obj/:
MSYS_NO_PATHCONV=1 docker run --rm --memory 3g \
-v "$PWD:/src" -v cea-nuget-m10:/root/.nuget/packages -w /src \
mcr.microsoft.com/dotnet/sdk:10.0 \
sh -c "dotnet test; find . -type d \( -name bin -o -name obj \) -prune -exec rm -rf {} +"Code explained line by line
AccountRequestis a record with exactly the fields a person must supply. Everything else (tags, controls, baseline) comes from the OU and the customizations, so nobody types it twice.OuEnvironmentsencodes the rule "prod accounts only in the prod OU, sandbox only dev". It is the data behind the validation, easy to review and to extend when a new OU appears.[GeneratedRegex]creates compiled regular expressions at build time, and the class ispartialso the generator can add methods. The name pattern allows lowercase letters, digits and single hyphens, which avoids names that are awkward in automation.- The email rule insists on a shared mailbox in the bank's domain and rejects
+aliases. Each AWS account needs a unique root email, and the mailbox must outlive any one person. Validatereturns a list of problems, not a bool, so a pull request comment can show all of them at once.ValidateBatchadds checks across requests, such as two requests with the same name in one pull request.- The tests use
withexpressions to take a good request and break exactly one field. Each test proves one rule blocks and the first test proves the good request is not over-blocked.
Security considerations
⚠ Learning shortcut — not for production
This lesson is design-only and uses fictional accounts, emails and domains. A real landing zone is created from a dedicated management account with a carefully protected root user, MFA, a break-glass process and a reviewed change process. Do not create a Control Tower landing zone in a personal learning account without understanding the Config, CloudTrail and IAM Identity Center resources it creates.
- The management account is the most sensitive account you own. SCPs do not apply to it. Keep workloads out, restrict who can sign in, and monitor every action.
- Control Tower is not a compliance certificate. Its controls help enforce your own rules. Which rules your bank needs for UK GDPR, PCI DSS or operational resilience is a decision for compliance and legal teams.
- Root email addresses are an attack surface. Use shared mailboxes with controlled access and MFA on the root user, not personal addresses. Prevent mailbox takeover; it can lead to account takeover.
- Treat the account-request repository as tier-zero. Merging a file creates an account with a baseline and may grant access. Require reviews from the platform and security teams.
- Do not edit Control Tower-managed resources by hand. Use Control Tower's own interfaces so the landing zone can be updated and drift is meaningful.
- Data residency. A Region deny control restricts where services run; whether a Region is acceptable for personal data is a legal question, and it is your compliance team's call.
Banking use case
Harbourline's platform team owns the landing zone repository. A product team opens a pull request adding hl-payments-dev.tf. CI runs the C# validator: the name and email are fine, but the OU says Workloads-Prod for a dev environment, so the build fails with a readable message. The author fixes it; two platform engineers approve; the merge starts the AFT pipeline. Within about an hour (the time depends on the pipeline and account creation) the account exists in the right OU, Control Tower's baseline and controls apply, the pipeline role and bootstrap are deployed by the workload baseline customization, a budget alarm is set, and the account's metadata is recorded. The security team sees the new account in the Audit account's views without any manual step, and an auditor can trace the account to a pull request, an approver and a ticket.
Common mistakes
- Starting without deciding the home Region and OU layout. Both are painful to change later.
- Putting workloads in the management account. SCPs do not constrain it, and a compromise is catastrophic.
- Customising by hand in the console. The next landing-zone update reports drift, or the change is lost.
- Using AFT, AFC and CfCT for the same job. Choose one primary mechanism per concern.
- Deploying application infrastructure through the account pipeline. AFT is meant for provisioning and customising accounts; application stacks belong in their own pipelines.
- Ignoring the Config bill. Detective controls and recorded configuration items cost money, especially with short-lived resources.
- Creating accounts faster than you can manage them. Every account needs an owner, a baseline, a budget and a decommissioning path.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Account request validator fails with "Unknown organizational unit" | The OU name is misspelt or the OU does not exist yet | Use the exact OU name from the Control Tower Organization page, or create the OU first |
| AFT pipeline does not start after merge | The request file is not in the repository the pipeline watches, or the branch is wrong | Check the AFT account-request repository and the pipeline source branch in the AFT management account |
| Account creation fails because the email is already in use | The root email belongs to another AWS account | Use a new shared mailbox address; every account needs a unique root email |
| Control Tower reports drift on an OU | Someone changed an SCP or moved an account outside Control Tower | Use Control Tower's repair or re-register option; avoid out-of-band changes |
| Landing zone update fails | A managed resource was edited or deleted by hand | Restore the expected state or follow the documented repair steps; open a support case if needed |
| A new account lacks the baseline resources | The customization did not run or failed | Check the AFT customization pipeline logs or the StackSet operation status |
| Terraform in AFT fails with access denied | The AFT execution role lacks permission for a resource in your customization | Grant the minimum permission to the customization role, not administrator |
| A proactive control blocks a CloudFormation deployment | The template violates the control (it works as designed) | Fix the template; do not disable the control unless the risk owner agrees |
Cost and cleanup
This lesson costs nothing: it is design and local tests. The point about cost is for your later planning.
- Control Tower itself has no additional charge. You pay for the services it sets up and uses: AWS Config (the largest cost in AWS's examples), CloudTrail, CloudWatch, Service Catalog, S3, SNS and VPC. AWS Organizations and IAM Identity Center have no extra charge.
- AWS's own pricing examples (checked 2026-11-18 ⚠ VERIFY on the pricing page): about 3.75 USD per month for 10 accounts with 5 detective controls in 1 Region, and about 60.63 USD per month for 25 accounts with 5 detective controls in 3 Regions. Ephemeral workloads (such as Spot instances or auto scaling) can raise Config costs sharply because each creation and deletion is recorded; the pricing page's example reaches about 372 USD per account per Region per month.
- AFT adds an extra account and its own pipeline, Lambda, Step Functions, CodeBuild and storage costs ⚠ VERIFY with the AWS pricing calculator.
Free alternative used by this course: design on paper, validate with the C# tests, and build a lite landing zone with Organizations and a few SCPs in Module 15.
# Nothing to tear down. If you created a scratch folder for the tests, remove it:
rm -rf ./account-requests-labExercises
- 🟢 Guided: create the four files, run the tests, then add a fifth OU
Infrastructurethat may holddev,testandprodaccounts. Add a test that anInfrastructureaccount with environmentprodis accepted. - 🟡 Challenge: draw (Mermaid or paper) a Harbourline organization with at least five OUs, the shared accounts and three SCPs you would attach (for example a Region restriction, a block on leaving the organization and a block on disabling CloudTrail). For each, say which OU it attaches to and which team approves a change.
- 🔴 Live problem: the bank acquires a small fintech with 12 AWS accounts, each created with a personal email, no common logging and administrator access for most developers. The CIO wants them under the Harbourline landing zone in 90 days with no outage. Write the plan: what you inventory first, which accounts you enrol and in which order, what controls you start in detective mode before making them preventive, what you do about the personal root emails, and what you will explicitly not promise in 90 days.
Assignment
Add a landing-zone-design folder to your portfolio repository with: a one-page design (Mermaid diagram of OUs and accounts, a controls table by OU, the account-vending workflow); the account-request validator with tests; two sample requests, one valid and one invalid, with the expected output of the validator; and a short note choosing AFT, AFC or CfCT for your hypothetical team with the reasons. Mark any fact you did not verify with ⚠ VERIFY. Do not claim the design makes the bank compliant with anything.
Solutions
Add ["Infrastructure"] = ["dev", "test", "prod"] to OuEnvironments, then the test:
[Fact]
public void Infrastructure_ou_accepts_prod_accounts()
{
var request = Good() with { OrganizationalUnit = "Infrastructure", Environment = "prod" };
Assert.Empty(AccountRequestValidator.Validate(request, NoNames, NoEmails));
}The rule table is data, so a new OU is a one-line change plus a test. The test also protects the other three OUs from being loosened by accident.
There is no single correct design. A strong one has: Security (Log Archive, Audit), Infrastructure (Network, Tooling, AFT management), Workloads-NonProd, Workloads-Prod and Sandbox. SCPs: (1) Region restriction on workload OUs, approved by compliance and platform; (2) deny organizations:LeaveOrganization on the root, approved by platform; (3) deny cloudtrail:StopLogging and cloudtrail:DeleteTrail on all OUs except a break-glass role, approved by security. Each SCP is stored as code and changed through a reviewed pull request. Note where each is not effective: SCPs do not restrict the management account, and they do not grant permissions.
For the live problem, a sound answer: first inventory (accounts, owners, root emails, regions in use, cost, what runs), then move the root emails to shared mailboxes and enable MFA on every root user (quick, high value), invite and enrol accounts into a dedicated OU with only detective controls and read-only logging first, review findings with the account owners, add preventive controls gradually, and sequence accounts by risk. Do not promise to remove administrator access, rebuild everything as code or reach full control coverage in 90 days; promise visibility, ownership, logging and a prioritised remediation plan.
Knowledge check
Answer: it orchestrates existing services including AWS Organizations, AWS Service Catalog and AWS IAM Identity Center (plus Config, CloudTrail and others). It is not a separate technology stack.
Answer: preventive controls use SCPs and RCPs, detective controls use AWS Config rules, and proactive controls use CloudFormation Hooks that check resources before they are provisioned.
Answer: it is a Terraform pipeline for provisioning and customising Control Tower accounts from account-request files in Git. It is not intended to deploy application resources such as EC2 instances.
Answer: SCPs do not apply to the management account, so it cannot be fenced in by the organization's guard-rails, and compromising it would affect the whole organization.
Answer: no. Controls help enforce rules you choose; deciding which rules satisfy a regulation, and proving it, is a compliance responsibility.
Interview questions
- What is a landing zone and why does a bank need one? A governed multi-account environment with shared logging and security accounts, OU-level guard-rails and a standard way to create accounts, so every account starts from the same secure baseline and separation of duties is built in.
- How would you let teams request AWS accounts safely? Account requests as files in Git, validated in CI, reviewed by the platform and security teams, then provisioned through Account Factory (via AFT or the console with blueprints), with the baseline applied automatically.
- Preventive versus detective controls: when do you use each? Preventive controls where a violation must never happen (disabling logging, leaving the organization), detective controls where you need visibility first or the rule is too nuanced to deny outright. Start detective in an existing estate, then tighten.
- What are the risks of changing Control Tower-managed resources by hand? Drift, failed landing-zone updates and lost changes; use Control Tower's own interfaces and the customization mechanisms.
Certification practice
A financial services company wants to create new AWS accounts for product teams on request. Each new account must automatically be placed in the correct organizational unit, receive centralized logging and standard guard-rails, and the team wants account requests to be managed through Git with Terraform. Which solution meets the requirements with the LEAST custom work?
A. Create each account manually in the Organizations console and configure logging by hand. B. Use AWS Control Tower with Account Factory for Terraform (AFT), committing account request files to the AFT repository. C. Write a Lambda function that calls the Organizations API and configures CloudTrail in each account. D. Share one account among all product teams using IAM users.
Answer: B. AFT provisions and customises accounts through Control Tower from Git-driven Terraform requests, with the baseline and controls applied. A and C are manual or custom work. D removes account-level isolation.
An operations team must ensure that CloudFormation stacks in all workload accounts cannot create resources that violate a company encryption rule, and that non-compliant templates are rejected before any resource is created. Which approach fits best?
A. Enable a detective AWS Config rule and review the report weekly. B. Use a proactive control (a CloudFormation Hook) enabled through Control Tower for the workload OUs. C. Send an email to developers asking them to follow the rule. D. Turn off CloudFormation in the accounts.
Answer: B. Proactive controls use CloudFormation Hooks to evaluate resources before provisioning and block non-compliant ones. A detects after the fact. C is not enforcement. D prevents legitimate work.
Completion checklist
- I can explain what a landing zone is and what Control Tower orchestrates
- I can name the three control types and how each is implemented
- I can say when I would use AFT, AFC blueprints or CfCT
- I ran the fourteen account-request tests and added a new rule
- I drew a Harbourline OU design and wrote down who owns each guard-rail
- I know what Control Tower costs and where the bill comes from
Key takeaways
- A landing zone is a governed multi-account foundation; Control Tower builds and governs it by orchestrating Organizations, Service Catalog, Identity Center, Config and CloudTrail.
- Controls come in three kinds (preventive, detective, proactive) and three guidance levels (mandatory, strongly recommended, elective).
- Use Git as the source of truth for account requests. AFT is the Terraform path; AFC blueprints and CfCT are the CloudFormation-flavoured paths.
- Validate requests in CI with tested code before a human reviews them.
- Control Tower is free to use, but the services it enables are not. Keep workloads out of the management account and never claim a control equals compliance.
- You build a real, lite landing zone in Module 15.
Further reading
- What is AWS Control Tower?
- How controls work in AWS Control Tower
- Overview of Account Factory for Terraform (AFT)
- Customize accounts with Account Factory Customization (AFC)
- Build your own customizations (CfCT)
- AWS Control Tower pricing
- Module 15: Governance and FinOps
- Previous: Policy-as-code and secure deployment · Back to the Module 10 overview
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.
Policy-as-code and secure deployment
Scan templates and plans before anything is deployed with cdk-nag, CloudFormation Guard, cfn-nag and Checkov, give pipelines least-privilege deploy roles, and stop a plan from deleting a database with a small C# guard.
Module 10 cheat sheet
One-page revision summary for Infrastructure as Code: tools, .NET and Azure mapping, CLI commands, limits, decision rules, exam traps and cost traps.