camzabriskie.com

Primers › Deployment

An AWS account set per customer

05 / 06 updated Oct 23, 2026 AWS only
On this page
  1. A few terms
  2. Why an account per environment
  3. Laying out the organization
  4. Onboarding Acme, step by step
  5. How the platform reaches into each account
  6. Limits that show up at this scale
  7. Day two across many accounts
  8. How many non-production accounts?
  9. Where to start
  10. References

The customer separation primer laid out the options from each customer having their own AWS accounts down to everyone sharing one database. This primer builds the top rung on AWS with Kubernetes on EKS. Each customer gets two AWS accounts: one for production, and one test account where a release is checked against that customer’s configuration before it reaches their production.

The running example is the same made-up company. Ledgerly sells an invoicing app, it runs on EKS, and its customers’ contracts say their data lives in accounts nobody else uses. Acme has just signed and needs acme-test and acme-prod. Ledgerly’s own engineers develop in internal accounts, so no customer needs a dev account of their own.

A few terms

Why an account per environment

AWS’s own guidance on multi-account setups lists the reasons, and most of them line up with what a customer asking for isolation wants [10]:

Accounts themselves cost nothing; AWS charges for what runs in them, not for the number of accounts [1]. The cost is in running many of them, which the rest of this primer is about.

Laying out the organization

AWS’s recommended layout groups accounts by what they do, not by who owns them. A Workloads OU holds business applications, with production and non-production split into child OUs; a Security OU holds the accounts that apply security and compliance controls; an Infrastructure OU holds shared networking; and a Deployments OU holds the accounts that run CI/CD and deploy into everything else [11], [12]. Ledgerly’s customer accounts slot into the Workloads OU like this:

Customer accounts sort by environment first, so one SCP on the Prod OU covers every customer's production. The platform account (teal) deploys into all of them.

Sorting by environment first, rather than making an OU per customer, means a production rule gets written once and applies to every customer’s production account the moment it’s created. If one customer needs a rule nobody else has, AWS’s layout has an Exceptions OU for accounts that deviate from the standard [11], though every exception is one more thing to keep track of.

The platform account is where the self-service platform itself lives: the pipelines, Argo CD, and the container registry. AWS recommends keeping CI/CD out of workload accounts, partly because deployment tooling needs access to both production and non-production, and running it from a production account would mean letting production reach into non-production [13]. Production accounts only need to read finished artifacts, not write them [13].

Onboarding Acme, step by step

Sales signs Acme. The platform’s front door is a pull request that adds one file:

# customers/acme.yaml
name: acme
environments:
  - name: test
    ou: NonProd
    size: small
  - name: prod
    ou: Prod
    size: medium
region: us-east-1
release: 2026.10.2

Once it merges, the pipeline does the rest:

  1. Create the accounts. For each environment the pipeline writes an AFT account request, a small Terraform file with the account’s name, an email address for it, the OU to put it in, and tags, and pushes it to AFT’s request repository. AFT creates the account through Control Tower, so it starts with the landing zone’s controls [6], [7].
  2. Apply the baseline. AFT runs customizations, Terraform or scripts, on every account, on a group of accounts, or on one [14]. The baseline every Ledgerly account gets: the roles the platform will assume, a VPC with an address range handed out by IPAM (AWS’s IP address manager, which can allocate ranges to new VPCs automatically by rules you set [15], so no two customers’ VPCs collide if they ever need connecting), and logging.
  3. Build the environment. A Terraform module, the same one for every customer, creates the EKS cluster, the database, and storage inside each new account [16].
  4. Register the cluster. The new cluster is added to Argo CD in the platform account, with an access entry letting the platform’s role deploy into it (next section).
  5. Deploy. Argo CD’s ApplicationSet sees a new cluster and generates an Application for it [17], and release 2026.10.2 has already passed in Ledgerly’s internal ledgerly-dev, so it rolls out to acme-test, then to acme-prod once Acme’s checks pass.

AWS documents step 1’s input as a Terraform file and starts processing with a git push [7], so the whole chain, from merged pull request to running cluster, needs no person in the middle.

How the platform reaches into each account

Nothing in the platform account can touch Acme’s accounts by default. Every crossing is a role that trusts another role, and there are only a few of them:

Teal is the deploy path, crossing into the customer's account through one role. The image pull is the only other crossing, and it's read-only.

  1. Assume. Argo CD runs with a “management role” in the platform account. Each customer cluster has its own role, in the customer’s account, that the management role is allowed to assume [18].
  2. Authorize. An EKS access entry in each cluster gives that cluster role Kubernetes permissions [18], [8]. The cluster’s registration in Argo CD is a Secret naming the cluster and the role to assume [18].
  3. Sync. With those credentials Argo CD applies the app to the cluster. One Argo CD connects out to many clusters’ API servers [19], so it needs a network path to every cluster’s endpoint, which is a networking decision to make early (see reaching private resources).
  4. Pull. The cluster’s nodes pull images from ECR in the platform account. An ECR repository policy can allow other accounts in [20], and ECR can also replicate images into other accounts’ registries if you’d rather each account pull locally [21].

The app itself gets AWS permissions through Pod Identity, with a role that lives in Acme’s own account, so its permissions only ever need to name Acme’s own resources [9].

The other way to do step 3 is to install Flux in every cluster and let each one pull from git itself (the GitOps primer compares the two). Then nothing in the platform account needs credentials for customer clusters at all, at the cost of one more thing installed and upgraded per cluster.

Limits that show up at this scale

Every customer adds two accounts and two clusters, so Ledgerly with 40 customers has 80 customer accounts, plus the shared ones. A few AWS limits matter well before that:

LimitDefaultWhy it matters
Accounts in an organization10, adjustable; AWS can grant up to 50,000 depending on the customer [22]With six shared accounts (management, log, audit, network, platform, internal dev) and two per customer, the third customer won’t fit until you ask for an increase
Accounts being created at once5 [22]Onboarding several customers at once queues
Accounts closed in 30 days20% of member accounts or 250, whichever is higher, up to 1,000; not adjustable [22]Mass teardown has to be spread out
Closed accountsStill count toward the organization’s limit until permanently closed [22], 90 days after closing [23]A departed customer’s accounts take up quota for three months

People hit the first row on day one. Ask for the increase before the platform goes live, sized for the customers you expect plus the environments each one gets.

Day two across many accounts

Making accounts is the easy half here too. Keeping 80 of them alike is the job.

Baseline changes. A new logging rule or role has to land in every account. AFT reruns its customizations on all accounts, a set, or one [14], and CloudFormation StackSets can create, update, or delete the same stack across many accounts and regions in one operation [24]. Either way the change is written once and fanned out, never clicked into each account.

Kubernetes upgrades. Kubernetes ships a new minor version about every four months. EKS gives each one 14 months of standard support, then 12 months of extended support at an extra cost per cluster hour, and after that it upgrades the cluster automatically [25]. Clusters move one minor version at a time, and a rollback is possible only within 7 days of upgrading [26]. With a release every four months, each cluster needs about three upgrades a year. At 80 customer clusters that’s roughly 240 cluster upgrades a year, about one every working day, so upgrades have to be a pipeline that runs in waves (Ledgerly’s internal clusters, then every customer’s test cluster, then production) rather than a task someone does.

App releases. The same wave pattern carries app releases. A new Ledgerly version goes to the internal accounts, then every customer’s -test account, then production, and the release field in each customer file only ever lags, never forks. AWS’s SaaS guidance is clear that dedicated stacks should all run the same version [27].

Cost. Each account is visible on the combined bill [2], which makes idle non-production accounts easy to spot. Every silo carries idle capacity [28], and with a test account per customer, half of Ledgerly’s customer accounts sit idle between releases. Scaling test clusters down when no release is in flight cuts that cost.

How many non-production accounts?

The number of non-production accounts per customer is the decision with the biggest cost lever. Three common shapes, with Ledgerly’s choice in the middle:

ShapeAccounts for 40 customersGood for
Prod per customer, one shared test account40 + 1Customers who only care where their production data lives
Prod and one test account per customer (Ledgerly)80Testing a release against each customer’s configuration before it reaches them
Prod, test, and dev per customer120Customers who get their own pre-production access, or need to test integrations against it

Ledgerly picked the middle row because each customer’s configuration differs enough that a release should be proven against it before it reaches their production, and because development happens in internal accounts anyway. A shared test account can still hold one namespace per customer, configured like that customer’s production, which tests their configuration without the account. Per-customer non-production accounts earn their cost when the customer logs into them, when their configuration differs in ways a namespace can’t reproduce (their own network connection, their own identity provider), or when a contract requires it.

Where to start

  1. Set up the landing zone with Control Tower, and the OU layout above, before the first customer account exists [5]. An account’s OU decides which SCPs it gets, and AWS recommends moving accounts into a newly governed OU a few at a time so a policy doesn’t lock anyone out [3], so it’s easier to get the tree right first.
  2. Ask for the account quota increase [22].
  3. Build one environment by hand-running the module, in one account, until a teardown and rebuild produces the same thing.
  4. Wire AFT and the platform account, then onboard an internal “customer” (yourselves) through the pull request, end to end.
  5. Automate the upgrade waves before the tenth customer, not after.

For the other end of the scale, where customers share one app and one database, see the fully pooled version.

References

Show all 28 sourcesHide sources
  1. [1] ↩ a b Amazon Web Services, “Organizing Your AWS Environment Using Multiple Accounts,” AWS Whitepapers, Apr. 30, 2025. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/organizing-your-aws-environment.html
  2. [2] ↩ a b c Amazon Web Services, “Consolidating billing for AWS Organizations,” AWS Billing and Cost Management User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/consolidated-billing.html
  3. [3] ↩ a b Amazon Web Services, “Service control policies (SCPs),” AWS Organizations User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html
  4. [4] ↩ Amazon Web Services, “IAM tutorial: Delegate access across AWS accounts using IAM roles,” AWS Identity and Access Management User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html
  5. [5] ↩ a b Amazon Web Services, “What Is AWS Control Tower?” AWS Control Tower User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/controltower/latest/userguide/what-is-control-tower.html
  6. [6] ↩ a b Amazon Web Services, “Overview of AWS Control Tower Account Factory for Terraform (AFT),” AWS Control Tower User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/controltower/latest/userguide/aft-overview.html
  7. [7] ↩ a b c Amazon Web Services, “Provision a new account with AFT,” AWS Control Tower User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/controltower/latest/userguide/aft-provision-account.html
  8. [8] ↩ a b Amazon Web Services, “Grant IAM users access to Kubernetes with EKS access entries,” Amazon EKS User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html
  9. [9] ↩ a b Amazon Web Services, “Learn how EKS Pod Identity grants pods access to AWS services,” Amazon EKS User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html
  10. [10] ↩ a b c d e f Amazon Web Services, “Benefits of using multiple AWS accounts,” Organizing Your AWS Environment Using Multiple Accounts (AWS whitepaper). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/benefits-of-using-multiple-aws-accounts.html
  11. [11] ↩ a b Amazon Web Services, “Recommended OUs and accounts,” Organizing Your AWS Environment Using Multiple Accounts (AWS whitepaper). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/recommended-ous-and-accounts.html
  12. [12] ↩ Amazon Web Services, “Application OUs,” Organizing Your AWS Environment Using Multiple Accounts (AWS whitepaper). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/application-ous.html
  13. [13] ↩ a b Amazon Web Services, “Advanced OUs,” Organizing Your AWS Environment Using Multiple Accounts (AWS whitepaper). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/advanced-ous.html
  14. [14] ↩ a b Amazon Web Services, “Account customizations,” AWS Control Tower User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/controltower/latest/userguide/aft-account-customization-options.html
  15. [15] ↩ Amazon Web Services, “What is IPAM?” Amazon VPC IP Address Manager. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html
  16. [16] ↩ HashiCorp, “Modules overview,” Terraform Language Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://developer.hashicorp.com/terraform/language/modules
  17. [17] ↩ The Argo Project, “Cluster Generator,” Argo CD Documentation. Accessed: Oct. 14, 2026. [Online]. Available: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Cluster/
  18. [18] ↩ a b c The Argo Project, “Declarative Setup,” Argo CD Documentation. Accessed: Oct. 14, 2026. [Online]. Available: https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/
  19. [19] ↩ The Argo Project, “Architectural Overview,” Argo CD Documentation. Accessed: Oct. 14, 2026. [Online]. Available: https://argo-cd.readthedocs.io/en/stable/operator-manual/architecture/
  20. [20] ↩ Amazon Web Services, “Private repository policy examples in Amazon ECR,” Amazon ECR User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policy-examples.html
  21. [21] ↩ Amazon Web Services, “Private image replication in Amazon ECR,” Amazon ECR User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/AmazonECR/latest/userguide/replication.html
  22. [22] ↩ a b c d e Amazon Web Services, “Quotas and service limits for AWS Organizations,” AWS Organizations User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html
  23. [23] ↩ Amazon Web Services, “Closing a member account in an organization with AWS Organizations,” AWS Organizations User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html
  24. [24] ↩ Amazon Web Services, “Managing stacks across accounts and Regions with StackSets,” AWS CloudFormation User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html
  25. [25] ↩ Amazon Web Services, “Understand the Kubernetes version lifecycle on EKS,” Amazon EKS User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
  26. [26] ↩ Amazon Web Services, “Update existing cluster to new Kubernetes version,” Amazon EKS User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html
  27. [27] ↩ Amazon Web Services, “Full stack silo and pool,” SaaS Architecture Fundamentals (AWS whitepaper). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/saas-architecture-fundamentals/full-stack-silo-and-pool.html
  28. [28] ↩ Amazon Web Services, “Silo isolation,” SaaS Tenant Isolation Strategies (AWS whitepaper), Aug. 2020. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/saas-tenant-isolation-strategies/silo-isolation.html

Every source cited across the primers is collected on one page.