Why production should not live in one undifferentiated account
corebeginnerAn AWS account is a hard boundary — IAM permissions, resource limits, even a compromised credential all stop at the account edge. Putting development, staging and production in one account means a mistake in one can reach the others.
Think of it as
One account is one building with no internal walls. A fire in the test kitchen and a fire in the server room are the same fire. Separate accounts are separate buildings — a disaster in one cannot walk into another.
What we're doing: See what a shared account actually risks, using a real failure shape rather than a hypothetical.
- 2
- A copy-pasted connection string pointed at production — nothing in the account stopped it, because dev and prod were the same account.
- 5
- In a separate prod account, that same script would have failed at the credential/connectivity level, long before it reached a real table.
Why this works: A configuration mistake — the wrong URL, the wrong tag, the wrong IAM policy target — is normal and will happen. Separate accounts turn that mistake into a connection failure. One shared account turns it into an incident.
Relying on naming conventions instead of account boundaries
Wrong
Better
What you see: An IAM policy meant to scope a developer to "anything with -dev in the name" is either too loose (matches more than intended) or too strict (breaks a legitimate case) — and nothing stops a typo from reaching the prod-named resource anyway.
Why: A naming convention is a string a human or a script can get wrong. An account boundary is enforced by AWS itself at the IAM and networking layer — it does not depend on every policy and script getting the naming pattern right, every time, forever.
- One account for everything
- A dev IAM policy typo can touch a prod resource
- Runaway test traffic competes with prod for the same quotas
- One compromised credential is a blast radius over everything
- The bill is one number — cost by environment needs tagging discipline
- One account per environment
- IAM policies in dev cannot reach prod resources at all
- Each environment has its own service quotas
- A compromised dev credential stops at the dev account boundary
- The bill is naturally split per environment, no tagging required
Remember: An account is a real security boundary. Separating dev/staging/prod by account, not by naming convention, stops a mistake in one reaching another.
See also: environment separation · organizations and scps

