All posts
Internet Fundamentals

Dev, Staging and Production for a Small Team: Separate Accounts, Preview Environments and Real Data

By

October 26, 2026

5 min read

Most fast-built apps have one environment, or a staging that shares production's database. The minimum separation worth having, why separate AWS accounts beat naming conventions, preview environments per pull request, and how to test with realistic data without copying customers' personal information.

Internet Fundamentals
Environments
AWS Organizations
CI/CD
Testing

Testing in production is fine until a test deletes customer data, sends a real email to every user, or charges real cards. Separation exists so that mistakes have somewhere harmless to happen.

The minimum

Environment

Purpose

Data

Local

Day-to-day development

Seeded fake data

Preview per pull request

Review a change in a running app before merging

Seeded fake data, torn down on merge

Staging

Final check of what is about to ship, with production-like configuration

Fake or anonymized data

Production

Customers

Real

Want a second opinion on this for your system?

Book a free 30-minute call. You'll leave knowing what we'd do first and roughly what it costs, whether or not you hire us.

Separate AWS accounts

Put staging and production in different AWS accounts under AWS Organizations, not different names in one account. Permissions, quotas, costs and blast radius separate cleanly, and a developer's staging credentials cannot touch production. It costs nothing extra, and infrastructure as code makes the accounts identical apart from size.

Data

  • Never point staging at the production database, even read-only.

  • Do not copy production personal data into lower environments. Generate realistic fake data, or anonymize irreversibly.

  • Use sandbox modes of providers (Stripe test mode, email sandboxes) everywhere except production.

  • Make it hard to send real email or SMS from non-production: an allow-list of internal addresses.

Secrets and configuration

  • A separate secret per environment for every provider.

  • Configuration in the environment, not in code branches.

  • Production deploys only from CI, with the same artifact that passed staging.

hoolco Monthly Review

Once a month: what changed in tech that month and what it means for you, from cloud and AI to security and the tools you build with. Every item links to its source. No sales pitch, unsubscribe in one click.

As of October 26, 2026. Provided as is, for general information, and accurate to the best of our knowledge on the date shown. Not legal, compliance, tax, financial or other professional advice. Prices, limits and vendor services change; check current vendor documentation before relying on anything here. Terms of use.