← Back to all articles
Case Study · Cloud Automation

Automating AWS Control Tower
Landing Zones with AI

How we use custom LLM agents to generate compliant, secure multi-account AWS environments — turning a four-week delivery into a three-hour autonomous build.

GS
GSaralCloud AWS Cloud Platform · Agentic AI
16 min read
May 2026

The Problem with Traditional Landing Zone Delivery

Every regulated enterprise that adopts AWS at scale eventually arrives at the same problem. The cloud platform team is asked to hand new application teams a landing zone — a multi-account AWS environment, governed by Control Tower, wired into the company's identity provider, peered into the right networks, and locked down by a hierarchy of Service Control Policies that match the team's data classification, regulatory regime, and blast-radius requirements.

On paper this is a configuration problem. In practice it is a four-to-six week delivery cycle of meetings, ticket queues, copy-pasted Terraform modules, brittle IAM Identity Center mappings, and a final day of manual verification before the team is handed the keys. Every landing zone is subtly different. Every landing zone is a snowflake. And every snowflake is a future audit finding waiting to happen.

Definition

An AWS Control Tower landing zone is a pre-configured, multi-account AWS environment that includes an Organizations structure, baseline security controls, centralised logging, identity federation, and a set of mandatory and optional guardrails enforced through Service Control Policies and AWS Config rules.

We rebuilt this delivery process around a multi-agent system powered by Claude. The result is an architecture in which a platform engineer describes the workload in plain English — "a HIPAA-bound data-science workspace for Team Helix, two regions, VPC-only egress, no internet ingress, separate Dev/Test/Prod accounts" — and a coordinated set of LLM agents produces a fully reviewed, policy-validated, deployment-ready landing zone in under three hours.

~3 hr
End-to-end build, from intake to deploy-ready PR
87%
Reduction in cycle time vs. our previous Jira-driven process
0
Manual SCP authoring required for in-catalogue patterns
100%
Of generated zones pass our CIS & AWS FSBP baseline pre-deploy

Why This Is an Agentic Problem, Not a Template Problem

The natural first instinct for any engineer reading this is to ask: why not just write better Terraform modules? We tried. We had a catalogue of 40+ modules, an internal "platform-as-a-product" portal, and a team of four engineers maintaining them. The catalogue still could not absorb the long tail of variation that real teams bring. Some workloads need an egress-only Transit Gateway attachment. Some need Macie classification jobs scoped to a specific bucket prefix. Some need a Permissions Boundary that allows S3 but only with KMS-CMK encryption and only in two regions.

The combinatorial space of account topology × network design × identity model × data-class controls × regulatory regime is too large to template exhaustively. But it is not too large to reason about. That is the gap an agentic system fills: it composes existing modules in workload-specific ways, validates the composition against policy, and self-corrects when validation fails — which is exactly the kind of multi-step, dynamic, tool-using work that single-prompt LLM calls cannot reliably do.

Why agents

Landing-zone provisioning is a discovery-driven task with a deep tool surface (AWS APIs, IaC generators, policy linters, cost simulators) and strong correctness constraints (SCPs that block production traffic are an outage). It is the textbook case for a Decompose → Orchestrate → Execute agentic workflow.

We built the system on the DOE pattern described in our earlier write-up. A planner agent decomposes the request into a dependency graph. An orchestrator routes subtasks to specialist agents — one per concern (networking, IAM, SCPs, logging, cost, compliance). Each specialist owns a narrow tool surface and a narrow prompt, which keeps hallucinations contained and makes individual agents independently testable.

System Architecture

The system runs as a long-lived workflow inside our internal platform. The intake is a Slack command or a structured form. The output is a pull request against the platform monorepo, containing Terraform plans, generated SCPs, an architecture diagram, a cost estimate, and an evidence pack for the security review board.

The Three-Layer Agentic Stack

Layer 1 — Reasoning

  • Claude Opus as planner and reviewer
  • Claude Sonnet for specialist execution
  • Claude Haiku for validation passes
  • Structured outputs via tool use

Layer 2 — Orchestration

  • LangGraph for the task graph
  • Step Functions for durable runs
  • DynamoDB for shared agent state
  • S3 for artifact passing

Layer 3 — Execution

  • Terraform & CloudFormation generation
  • OPA / Conftest for policy-as-code
  • Checkov & tfsec for IaC linting
  • Read-only AWS APIs for grounding

Two design choices matter more than the rest. First, every agent is bounded by a tool whitelist. The networking agent cannot touch IAM. The IAM agent cannot touch SCPs. This compartmentalisation is what makes the system auditable — and what makes it safe to give it write access to a CI pipeline.

Second, no agent ever calls a mutating AWS API directly. Agents produce Infrastructure-as-Code. Humans (or, increasingly, our policy gate) approve a Terraform plan. Pipelines apply it. This separation is non-negotiable: it is the difference between a system you can trust with a production AWS organisation and a very expensive science project.

"Agents author intent. Pipelines own change. Humans own approval."

The Specialist Agents

The orchestrator dispatches to five specialist agents. Each has its own system prompt, its own tool surface, and its own evaluation suite. Adding a new concern — say, FinOps tagging policies — means adding a sixth agent, not modifying the existing five.

01

Topology Agent — Account & OU Design

Decides the Organizations Unit hierarchy, the number and purpose of accounts (Workloads/Sandbox/Security/Log Archive/Shared Services), and which Control Tower controls apply at which OU. Outputs an OU tree as JSON plus a justification trace citing the company's account-vending standard.

02

Network Agent — VPCs, Routing, Egress

Designs the VPC layout per account, allocates non-overlapping CIDRs from the IPAM pool, attaches to the Transit Gateway with the right route-table associations, and emits VPC endpoints for AWS services that the workload's egress posture disallows reaching over the public internet.

03

Identity Agent — IAM Identity Center & Permission Sets

Maps the requesting team's IdP groups to permission sets, generates least-privilege policies bounded by a Permissions Boundary, and produces the assignment plan across accounts. Refuses to grant anything outside the catalogue of vetted permission sets without an explicit override flag.

04

Guardrail Agent — SCPs & Config Rules

Composes the SCP stack from a library of vetted SCP fragments, attached at the right OU level. Generates AWS Config conformance packs aligned to the data classification (HIPAA, PCI, internal). Every SCP is dry-run simulated against recent CloudTrail logs from comparable workloads to flag false-positive denies before deploy.

05

Compliance & Cost Agent — Evidence & FinOps

Produces the evidence pack the security review board signs off on: a control matrix mapping each requirement to the IaC resource that satisfies it, a residual risks log, and a 30/90/365-day cost projection driven by the AWS Pricing API and historical usage of similar workloads.

Practitioner Note

The biggest lift in production was not building the agents. It was curating the catalogues they reference: the SCP fragment library, the permission-set catalogue, the IPAM pool, the conformance-pack inventory. Agents are only as good as the trusted building blocks they are told to compose. We treat catalogue curation as a permanent platform-engineering responsibility, not a one-time setup task.

An End-to-End Walkthrough

To make this concrete, here is the actual flow for a recent intake — a HIPAA-bound analytics workspace for an internal team, three accounts, two regions, no public ingress. The full run took two hours and forty minutes from Slack command to merged PR.

01

Intake & Specification

The platform engineer describes the workload in Slack. The intake agent converts free-form text into a structured LandingZoneSpec, asks clarifying questions for any ambiguity (data residency? backup retention? break-glass access path?), and writes the final spec to S3 as the immutable input for the rest of the run.

02

Plan Decomposition

The planner agent reads the spec and produces a directed task graph: which specialist agents must run, in what order, and which can fan out in parallel. For this workload: Topology runs first; Network and Identity fan out in parallel; Guardrails consumes both; Compliance runs last and depends on all four.

03

Specialist Execution

Each specialist agent runs against its own tool surface. The Topology agent queries the Organizations read API for naming-collision checks. The Network agent queries IPAM for free CIDR ranges. The Guardrail agent fetches the latest SCP fragment library from S3 and assembles the policy stack. Outputs are written to shared DynamoDB state, keyed by run ID.

04

IaC Synthesis

The synthesis agent assembles per-account Terraform stacks from the specialist outputs, wires module references together, and emits a single repository tree. Crucially, the agent does not write Terraform from scratch — it composes vetted modules from our internal registry, which keeps the generated code within a known, review-friendly shape.

05

Validation Gauntlet

The generated tree runs through Checkov, tfsec, and a custom Conftest policy bundle. Failures are routed back to the responsible specialist agent with the failing rule and the offending resource. The agent retries — typically once, occasionally twice. We cap retries at three; beyond that the run halts and a human is paged.

06

Blast-Radius Simulation

Before the PR opens, the SCP stack is dry-run against thirty days of CloudTrail logs from a comparable existing workload. Any API call that would have been denied is flagged. This single step has caught more pre-production issues than every other validation combined.

07

PR & Evidence Pack

The system opens a pull request with the Terraform tree, an architecture diagram rendered from the topology graph, the cost projection, and a machine-readable evidence pack the security review board can ingest. A human approver merges. The pipeline applies. The landing zone exists.

Excerpt — Generated SCP fragment for HIPAA workloads
# Auto-generated by Guardrail Agent · run_id 7f3e2a · attached to OU /Workloads/Helix-PHI
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DenyUnencryptedS3PutObject",
      "Effect": "Deny",
      "Action": "s3:PutObject",
      "Resource": "*",
      "Condition": {
        "StringNotEqualsIfExists": {
          "s3:x-amz-server-side-encryption": "aws:kms"
        }
      }
    },
    {
      "Sid": "DenyRegionsOutsideAllowList",
      "Effect": "Deny",
      "NotAction": ["iam:*", "organizations:*", "support:*"],
      "Resource": "*",
      "Condition": {
        "StringNotEquals": {
          "aws:RequestedRegion": ["us-east-1", "us-west-2"]
        }
      }
    }
  ]
}

Two things to notice. The SCP composition is not freeform LLM output — it is a composition of fragments from the curated library, each fragment hand-written by the security team. The agent's job is to pick the right fragments for the workload and parameterise them (allowed regions, KMS key alias, etc.). That single design choice is what makes the output safe to merge.

Manual vs. Agent-Driven Delivery

The contrast with our prior process is sharp on every axis we care about:

Dimension Manual Delivery Agent-Driven Delivery
Cycle time 4–6 weeks; bottlenecked on platform team capacity 2–4 hours; bottlenecked on review, not authoring
Consistency Drift between zones; every snowflake is unique Identical structure across zones; variation is parameterised
Auditability Tribal knowledge; control mappings reconstructed at audit time Evidence pack generated alongside IaC; control matrix is a build artifact
Compliance baseline Engineer-dependent; CIS/FSBP gaps caught after deploy Pre-deploy validation; gaps cannot leave the agent loop
Reviewer load Hours per zone; reviewers re-derive intent from PR diff Minutes per zone; intent is stated, diff confirms it
Failure mode Silent misconfiguration; surfaces as an outage or finding Loud agent failure; surfaces as a halted run with an explanation
Cost per zone ~80–120 engineer-hours of platform-team time ~$8–14 in inference + ~30 minutes of reviewer time

The Guardrails We Wish We'd Built First

The honest version of any agentic-systems story is the list of mistakes that shaped the production design. Ours fall into four categories, and skipping any of them in your own rollout will hurt.

What Worked

  • Bounding each agent to a narrow tool surface and a narrow prompt
  • Composing vetted IaC modules and SCP fragments rather than generating freeform code
  • Hard-separating agent authoring from pipeline application — agents never deploy
  • Replaying SCPs against historical CloudTrail before merge to catch false-positive denies
  • Treating the catalogue (modules, fragments, permission sets) as the real product
  • Caching prompts and module retrieval to bring per-zone inference cost under $15

What Bit Us

  • Letting agents author SCPs from scratch — they hallucinated condition keys that don't exist
  • Skipping retry caps early on; failed runs spiralled into hour-long retry storms
  • No shared state between agents in v1, which meant the IAM agent couldn't see the network plan
  • Overly permissive Permissions Boundaries; we now require an explicit override to widen them
  • Underestimating reviewer onboarding — humans needed training on what to actually check
  • Treating cost projections as authoritative; we now caveat them and require FinOps sign-off above $5k/mo

Non-Negotiable Guardrails

If you take only one thing from this article, take this list. These are the controls without which we would not have shipped the system to production.

  • Read-only AWS access for agents. No agent has iam:*, no agent has organizations:*Create*. Mutating actions go through the pipeline, behind a human approval, every time.
  • Composition over generation. Agents pick from vetted fragments; they do not write security-critical IaC from scratch. The catalogue is the trust boundary.
  • Policy-as-code as a non-bypassable gate. Conftest, Checkov, tfsec, and our internal OPA bundle all run on every PR. An agent cannot self-approve past a failing policy.
  • Replay before deploy. Every SCP change is dry-run against recent CloudTrail from a comparable workload before the PR is opened.
  • Bounded retry budget. Three attempts per agent, then the run halts and a human is paged. Agents that loop are agents that hallucinate.
  • Full traceability. Every artifact is signed with the run ID, the agent that produced it, the model version, the prompt hash, and the input spec hash. We can reconstruct any decision the system has ever made.
Hard-Earned Lesson

The first version of our system gave the planner agent the ability to revise the original specification mid-run if it found a contradiction. This sounded helpful. In practice it made the system non-deterministic across runs: the same intake produced different zones on different days. We removed the capability. The spec is now immutable once written; contradictions halt the run and require human resolution. Predictability beats cleverness.

What This Generalises To

Landing-zone provisioning is one instance of a much broader class of problems: structured configuration generation against a policy boundary. Kubernetes platform onboarding fits the same shape. Snowflake/Databricks workspace provisioning fits the same shape. Salesforce sandbox vending, internal CA issuance, VPN tunnel pairing, secret-store onboarding — all of them are problems where the space of valid outputs is infinite, the space of safe outputs is constrained by policy, and the work of producing one output sits awkwardly between configuration and code.

The pattern that worked for us — a planner, a small set of bounded specialists, a curated catalogue of building blocks, policy-as-code as the validation gate, and a hard separation between authoring and applying change — is the pattern we now reach for whenever we see this shape of problem. Agents do not replace platform engineering. They turn platform engineers from builders of one-off zones into curators of the catalogue agents compose from. That is a much better job.

The Real Win

The headline metric is the cycle-time reduction. The actual win is that every landing zone in our estate is now structurally identical, fully traceable, and provably compliant with the same baseline. The agent system did not just speed up the work — it made the output legible to auditors, FinOps, and the security review board in a way our manual process never managed.

Build the Catalogue.
Let the Agents Compose It.

AWS Control Tower landing zones are not a templating problem and they are not a free-generation problem. They are a composition problem under policy. Build agents that respect that, and you can ship a multi-account environment in an afternoon — with better controls than your manual process ever produced.

Tagged in
AWS Control Tower Landing Zone Agentic AI Multi-Account AWS Cloud Security Terraform SCP Compliance Platform Engineering 2026