Skip to content

SubstrateThe test harness for AI-generated infrastructure

An event-sourced AWS emulator for testing CloudFormation, CDK, Terraform, and any SDK or CLI call — deterministically, offline, and with cost visibility, before you deploy.

What is Substrate?

Substrate is an event-sourced AWS emulator for testing the infrastructure code that drives AWS — CloudFormation, CDK, Terraform, and any SDK or CLI call — deterministically, offline, and with cost visibility, before you deploy to a real account.

It models what is observable through an AWS API call — request/response shapes, resource state and how it transitions over a simulated clock, error codes, and seedable outcomes — not what software inside a resource does. That boundary is what makes every run reproducible: API observations can be recorded as events and replayed identically, whereas a real workload's timing, scheduling, and I/O cannot. See Scope & Philosophy for the full reasoning.

Use it two ways

  • As a server — run substrate, point any AWS SDK/CLI at http://localhost:4566. This is how most consumers use it. See Endpoint Configuration.
  • As a Go test harnessimport "github.com/scttfrdmn/substrate/emulator", spin up an in-process server or deploy a CloudFormation template directly. See the Testing Guide.

Substrate ships 63 built-in service plugins — see the Service Reference.