Newstratus advise: architecture decisions you can prove

Local AWS that
snaps back
in 11 ms.

Stratus is a single-binary AWS emulator built for CI pipelines and coding agents. Snapshot state, fork isolated test runs, replay faults by seed, and get failures explained in plain language.

brew install rmukubvu/tap/stratus

Homebrew, on Apple silicon or Intel.

ci · ubuntu-latest clean
$ stratus ci --seed ./snapshots/seeded -- go test ./...
→ private stratus on :52817 · fresh data dir
→ seeded from snapshot "seeded" in 12 ms
ok   orders/api        1.84s
ok   orders/worker     2.10s
ok   payments          0.97s
→ stopped 2 Lambda containers · removed data dir
exit 0  ·  nothing left behind
Works with
  • AWS CLI
  • AWS SDKs
  • AWS CDK
  • Terraform
  • GitHub Actions
  • Claude Code
  • Cursor
  • Codex
  • Any MCP client
89xfaster test isolationSnapshot restore vs. re-running setup between tests
2.2 sfor 200 testsIsolation overhead, down from 196 s
33AWS servicesFrom S3 and Lambda to real RDS, Kafka and Bedrock replay
1binary, every OSLinux, macOS and Windows. Docker only for real engines

What's new

Four reasons your tests stop being slow and flaky.

All of it is covered by tests and re-proven in CI on every push.

Available services

33 AWS services on localhost:4566.

Point the AWS CLI, any SDK, CDK or Terraform at Stratus and these just work. Databases, caches and Kafka are the real engines in Docker, so your drivers and clients talk to the real thing.

Compute4

  • LambdaDockerReal runtimes

    Functions run on AWS's own base images: Python, Node.js, Java, Ruby, .NET, Go, Rust and container images

  • Step Functions

    State machines with Choice, Map and Parallel states and Lambda tasks

  • ECS

    Clusters, task definitions, services and tasks

  • ECR

    Repositories and images

Storage and databases5

  • S3

    Buckets and objects, with hard-linked snapshots for large blobs

  • DynamoDB

    Tables, items, queries and batch writes

  • DynamoDB Streams

    Change streams that trigger Lambda

  • RDSDockerReal engine

    Real PostgreSQL, MySQL and MariaDB; data survives snapshots

  • ElastiCacheDockerReal engine

    Real Valkey/Redis and Memcached; keys survive snapshots

Messaging and events7

  • SQS

    Standard and FIFO queues, with Lambda triggers

  • SNS

    Topics with fan-out to SQS queues and Lambda functions

  • EventBridge

    Buses, rules and targets

  • EventBridge SchedulerFast-forward clock

    One-off and recurring schedules

  • Kinesis

    Data streams, with Lambda triggers

  • MSKDockerReal broker

    A Kafka-compatible Redpanda broker any Kafka client can use

  • SESCaptured inbox

    v1 and v2 sending APIs; every email lands in an inbox you can read

Networking and APIs6

  • API Gateway REST

    REST APIs, resources and methods

  • API Gateway v2

    HTTP APIs and routes

  • ELBv2

    Load balancers, listeners and target groups

  • Route 53Queryable DNS

    Hosted zones and record sets

  • Cloud Map

    Namespaces, services and instances, published as Route 53 records

  • ACM

    Certificates

Security and identity5

  • IAMOpt-in enforcement

    Users, roles, access keys and managed policies

  • STS

    Caller identity and AssumeRole

  • KMS

    Keys, aliases, encrypt and decrypt

  • Secrets Manager

    Secrets and versions

  • Cognito

    User pools, users, groups and sign-in

Management and observability5

  • CloudFormation

    Stacks and change sets

  • CloudWatch Logs

    Log groups, streams and events

  • CloudWatch Metrics

    Put and query metric data

  • SSM Parameter Store

    Put, get, describe and tag parameters

  • Fault Injection ServiceSeeded chaos

    Your FIS experiment templates, run against Stratus unchanged

AI1

  • Bedrock RuntimeRecord and replay

    Record real model answers once, replay them offline in every test run

Coverage depth varies by service; the bar is the contract test suite in the repo. How the real engines work →

Stratus and the AWS Emulator

Breadth from AWS. Behaviour from Stratus.

AWS now publishes an official emulator that aims to cover every AWS API, and it is the right tool when you need an API Stratus does not have yet. Stratus is built for the parts of testing that depend on state, permissions and failure.

AWS EmulatorStratus
API coverageAims to cover every AWS API model, strongest on the control plane33 services, focused on behaviour; 510 of 3,306 of their operations, the rest answer 501
StateHeld in memory and cleared when it stopsNamed snapshots that restore in ~11 ms and fork into parallel jobs
IAMPolicies are not evaluatedOpt-in enforcement or audit mode for IAM policies
Accounts and regionsAny account or region accepted, sharing one set of resourcesSeparate resources for every account and region
PlatformsNative Linux packages; a Docker image you build on macOS and WindowsOne binary for Linux, macOS and Windows
Also built into Stratus
  • Real Lambda runtimes
  • Real PostgreSQL, MySQL and Valkey
  • Kafka via Redpanda
  • Seeded chaos and FIS
  • MCP server and LLM diagnostics
  • stratus ci and a GitHub Action
  • SES captured inbox
  • An emulator clock tests can advance
  • stratus check before you run
  • Guided architecture decisions (ADRs)
  • Bedrock record and replay

AWS Emulator details are from its documentation as of November 2026. AWS Emulator is a product of Amazon Web Services; Stratus is an independent project.

Coverage and stratus check

Know what will work before you run it.

Stratus carries a catalogue of every operation AWS defines for the services it emulates, built from AWS's own service models. It says exactly which ones Stratus implements, checks your code against them, and validates requests the way AWS does.

510 of 3,306AWS operations implementedAcross the services Stratus emulates, measured by sending every operation once
501for everything elseAn operation Stratus lacks says NotImplemented. Never an empty success a test can't tell apart
1.44.11botocore modelsThe catalogue is generated from the service models AWS ships with botocore

stratus check, before you run anything

Scans Python (boto3), JavaScript (SDK v3) and Go (SDK v2) source for the AWS calls it makes, and lists the ones Stratus would answer with 501, with file and line. It exits 1 when anything would fail, so it can gate a CI job.

AWS's own validation errors

Requests that break the model's constraints, such as a missing member, a value too long or outside its enum, get the ValidationException AWS sends. On by default for ten JSON-protocol services; --validation off turns it off.

Coverage, per service

A generated page lists every operation AWS defines for each service and whether Stratus implements it. CI fails if the page and the code disagree.

Agents ask first

stratus_check runs the same scan over MCP, and stratus_coverage answers "does Stratus implement sqs AddPermission?" from the catalogue, without a running Stratus.

$ stratus check .
# Stratus check

Scanned 1 files under .: 6 AWS operations called,
4 implemented by Stratus.

## Not implemented

AWS has these operations; Stratus answers 501
NotImplemented. Tests that call them will fail.

- `dynamodb ExecuteStatement` at orders/worker.py:11
- `sqs AddPermission` at orders/worker.py:10

## Implemented

- `dynamodb PutItem` at orders/worker.py:9
- `sns Publish` at orders/worker.py:12
- `sqs DeleteMessage` at orders/worker.py:13
- `sqs ReceiveMessage` at orders/worker.py:8

exit 1

Architecture decisions

Pick the right AWS service, then prove it.

stratus adviseasks about your workload, rules out the options that cannot meet a hard requirement, checks the rest against AWS's regional quotas, prices them, proves them under load and writes the decision down as an ADR, with Terraform that has already been deployed once.

  1. 01

    Ask

    Ordering, peak and average rate, message size, consumers, replay, retention, region and how much the team can run.

  2. 02

    Rule out and rank

    Options that break a hard requirement are ruled out. The rest are checked against AWS's default quotas at your peak and ranked.

  3. 03

    Prove under load

    k6 drives each candidate's producer path at your peak in its own throwaway account, under the quotas AWS enforces.

  4. 04

    Write it down

    An ADR in the MADR layout, and Terraform for the choice, applied to Stratus, re-planned for drift and destroyed.

6messaging options weighedSQS standard, SQS FIFO, SNS fan-out to SQS, EventBridge, Kinesis Data Streams, MSK
0LLM calls inside StratusThe rules are code. Every quota cites the AWS page it came from
Offlinecost estimatesFrom a dated snapshot of AWS's public price list, built into the binary
A real proof: 400 messages/s in af-south-1, where SNS's default is 300 published messages a second. The rules flagged it as a caveat; the proof shows what the publisher sees.
OptionVerdictRan / targetRejectedp99
EventBridgeheld386 / 400 per s0 of 4,005 (0%)11 ms
Kinesisheld398 / 400 per s0 of 3,994 (0%)17 ms
SNS to SQSthrottledsns-publish-rate397 / 400 per s692 of 3,997 (17%)53 ms

Every verdict has its reasons

Ruled out, caveat, strength or not checked, each with the sentence that explains it. Unanswered questions are marked "assumed (default)" in the ADR so reviewers see what nobody said.

Cost before you commit

A monthly estimate per option at your average rate, from AWS on-demand list prices for your region, with the chosen option's line items so a reviewer can redo the sum.

Proofs that can't share quotas

Each candidate runs in its own throwaway account. --scale 0.1 runs at a tenth of the peak with every quota scaled alike, so a laptop can prove a design meant for 50,000/s.

Agents hold the conversation

Over MCP and both SDKs, an agent asks the person each pending question rather than guessing, and leaves the choice to them. Stratus supplies the facts.

$ stratus advise ask messaging --title "Order events"
...
1. kinesis        fits with caveats   95/100  ~$345.04/month
     caveat: 3 consumers reading every record exceed
     2 MiB/s of shared reads per shard; use enhanced
     fan-out or more shards.
2. msk            fits with caveats   85/100  ~$612.43/month
3. sqs-standard   ruled out            0/100  ~$946.08/month
     ruled out: A consumed message is deleted, so it
     cannot be replayed.
...
Costs: on-demand list prices published 2026-11-26.

Control API

A clean slate whenever you want one.

One JSON API on the normal Stratus port manages the emulator itself. Snapshots are transactionally consistent and hard-link blobs, so they cost little disk even with big S3 objects or Lambda bundles.

  • GET/healthStatus and readiness
  • POST/resetWipe all, or just ["s3", "sqs"]
  • POST/snapshotsCapture everything as "baseline"
  • POST/snapshots/{name}/restoreRoll back to it
Control API reference →
stratus wait                     # until /ready says yes
./scripts/seed.sh                # tables, queues, buckets, lambdas
stratus snapshot save baseline

go test ./orders/...             # tests mutate state freely
stratus snapshot restore baseline  # ~11 ms back to known-good
stratus reset s3 sqs             # or wipe just a couple of services

Emulator clock

Advance time instead of sleeping.

Every service reads time from one clock. It runs in real time until a test moves it, so a test crosses a five-minute timeout or a day-long TTL in one call. Freeze it for timestamps that never change between runs. Snapshots capture it, and a full reset returns it to real time.

One advance crosses
  • SQS visibility timeouts and delays
  • DynamoDB TTL expiry
  • CloudWatch alarm periods
  • S3 Object Lock retention
  • EventBridge schedules
  • Every recorded timestamp
  • GET/clocknow, offset and whether it is frozen
  • POST/clock/advanceBy a duration, or to a time
  • POST/clock/freezeHold it for stable timestamps
  • POST/clock/resumeRun again from where it was held
How the clock works →
aws sqs receive-message --queue-url "$QUEUE" --visibility-timeout 300
stratus clock advance 5m1s       # no sleep
aws sqs receive-message --queue-url "$QUEUE"   # the message is back

stratus clock advance 36h        # due schedules fire, TTLs expire
stratus clock freeze             # every timestamp holds still
stratus clock resume

Clean, fast CI

Every CI run gets its own private AWS.

stratus ci wraps your test command. Jobs run in parallel without sharing state, and nothing outlives the run: no orphaned containers, ports or data directories.

  1. 01

    Fresh instance

    Free port, empty data directory, AWS_ENDPOINT_URL set for your command.

  2. 02

    Seeded in ms

    Start from a seeded snapshot. Each job gets its own hard-linked copy.

  3. 03

    Your tests run

    The exit code is yours. Infra failures exit 125, so you can tell them apart.

  4. 04

    Nothing left behind

    Lambda, database and cache containers stopped and the data dir deleted, even on Ctrl-C.

An isolated AWS per run

Each run gets its own port, data directory and container names, so parallel jobs never see each other's writes.

Seed once, fork many

Start every job from one snapshot. Blobs are hard-linked, and RDS and ElastiCache come up with the rows and keys they held.

Infra failures exit 125

The exit code is your command's. If Stratus itself fails to start, you get 125, so a broken setup never looks like a failing test.

Self-cleaning, even after a crash

Containers are labelled with the instance, process and host that own them. The next start reaps anything a killed run left behind.

GitHub Action, two ways

Wrap one command with run, or start a background instance on a free port for later steps. A post step stops it and removes its containers when the job ends.

Forgotten servers stop themselves

Start stratus serve with --idle-timeout 30m and, once nothing has called it for that long, it shuts down and removes its containers. Health probes don't count as use.

Any runner fleet

Hosted runners on Linux, macOS and Windows, persistent self-hosted hosts, microVM fleets, GitHub container jobs and Kubernetes pods that share the host's Docker socket. Stratus works out how to reach its containers itself; Kubernetes pods on the node's socket need one setting.

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: rmukubvu/stratus@main
        with:
          seed: ./fixtures/snapshots/seeded   # optional
          run: go test ./...

Benchmark

From 196 seconds to 2.2.

Most integration suites spend their time getting back to a known state, not testing. Restoring a snapshot replaces about 2,000 setup calls per test, which makes isolation ~89x faster. Each strategy must restore the exact fixture, so a leaky one fails instead of looking fast.

4 vCPU Linux container. Fixture: 4 buckets × 100 objects, 3 tables × 500 items, 3 queues × 50 messages. CI reruns the benchmark on every push.

Methodology and raw numbers →
Median isolation time per test (lower is better)
  • Fresh emulator + setup1.0x
    982.1 ms
    200 tests: 196.4 s
  • Reset + setup1.0x
    1,028.2 ms
    200 tests: 205.6 s
  • Fresh from snapshot (--seed)78x
    12.5 ms
    200 tests: 2.5 s
  • Snapshot restore89x
    11.1 ms
    200 tests: 2.2 s

Cold boot on a fresh runner

A new microVM or ephemeral pod starts with nothing running. Stratus goes from a fresh process to serving a restored snapshot in milliseconds, so the VM and Docker daemon set your start-up time, not Stratus.

12 msto readyA fresh process, from start to serving requests
32 msto a seeded fixtureSnapshot restored: S3 objects, DynamoDB items, SQS messages
0.85 swith real PostgreSQLIncluding an RDS instance restored from the snapshot
Cold boot methodology →

Deterministic chaos

Chaos you can replay, not shrug off.

Whether the nth matching request is faulted depends only on the seed, the rule and n. Same seed, same faults, so a chaos failure is a bug you can reproduce. No service mesh, sidecar or code changes, because every call already goes through Stratus.

Actions
  • throttle
  • internal_error
  • unavailable
  • error
  • latency
  • drop
  • cold_start
  • function_error
  • duplicate
Internal event paths, which no fault injector in AWS can reach
  • SQS → Lambda
  • Kinesis → Lambda
  • DynamoDB Streams → Lambda
  • SNS fan-out
  • EventBridge targets
  • Step Functions tasks
  • Lambda destinations

Already write AWS Fault Injection Service templates? Stratus speaks the FIS API, so they run unchanged from the AWS CLI or any SDK. FIS support →

{
  "seed": 1234,
  "duration_seconds": 300,
  "rules": [
    { "id": "throttle-orders", "service": "dynamodb",
      "operation": "PutItem", "resource": "orders",
      "action": "throttle", "probability": 0.2 },
    { "id": "slow-s3", "service": "s3", "action": "latency",
      "latency": { "delay_ms": 400, "jitter_ms": 200 } },
    { "id": "cold-checkout", "service": "lambda",
      "resource": "checkout", "action": "cold_start", "max_hits": 1 }
  ]
}

Agent-native

A local AWS your coding agent can drive safely.

Claude Code, Cursor, Codex or any MCP client can check Stratus is up, save and roll back state, inject faults, and ask why a call failed, without parsing stack traces.

MCP server

One line to connect.

$claude mcp add stratus -- stratus mcp --start

--start gives the agent its own throwaway Stratus, removed on exit. Failing tools return a stable error code and a hint, so the agent can correct itself.

  • stratus_status
  • stratus_connection_info
  • stratus_diagnose
  • stratus_reset
  • stratus_snapshot_save
  • stratus_snapshot_restore
  • stratus_chaos_start
  • stratus_chaos_stop
  • stratus_clock_advance
  • stratus_check
  • stratus_coverage
  • stratus_advise_assess
  • stratus_advise_terraform
LLM diagnostics

Failures, explained for agents.

stratus diagnose --since 5m

1 failed request in 1 group: 1 missing resource. Start with dynamodb PutItem (ResourceNotFoundException).

category
missing_resource
likely_cause
The table "orders" does not exist in this account and region.
next_step
Create it in your setup step before use, and check the name. List what exists with aws dynamodb list-tables.
your_bug
true

Chaos faults are attributed to the rule that injected them, so an agent never “fixes” working code.

SDKs

TypeScript and Python, zero dependencies.

Typed errors and helpers that always clean up: snapshot scopes roll state back after a block and chaos scopes always stop the experiment. Python ships pytest fixtures too.

npm →
$npm install stratus-emulator
PyPI →
$pip install stratus-emulator

Source and changelogs: TypeScript · Python

import { StratusClient } from "stratus-emulator";
import { S3Client } from "@aws-sdk/client-s3";

const stratus = new StratusClient();
await stratus.waitUntilReady();
const s3 = new S3Client(stratus.awsConfig());

// Rolled back afterwards, even if the test throws
await stratus.withSnapshot(() => runMyTest(s3));

// Throttle the first PutItem; the experiment always stops
await stratus.withChaos(
  { seed: 42, rules: [{ service: "dynamodb", operation: "PutItem",
                        action: "throttle", max_hits: 1 }] },
  () => runMyTest(s3),
);

Demo

Watch an agent find a bug, fix it, and prove it under chaos.

A real stratus mcp session, replayed step by step. CI runs it on every push and fails if any step stops behaving as described.

  1. 1

    Seed and snapshot

    The agent runs setup once, then stratus_snapshot_save so every attempt starts identical.

  2. 2

    Test fails

    ResourceNotFoundException, buried deep inside botocore.

  3. 3

    Ask Stratus why

    stratus_diagnose: missing resource, your bug, here is the next step. The table is Orders, not orders.

  4. 4

    Fix and restore

    One-line fix, stratus_snapshot_restore, rerun. Green.

  5. 5

    Prove it under chaos

    Seed 42 throttles 30% of PutItem calls. The test still passes because the SDK retries.

  6. 6

    Real vs injected

    Diagnostics splits it: 0 real failures, 11 injected and retried. Nothing to "fix".

Pair it with Preflight

Emulate locally. Verify externally.

Preflight lints, scores, diagnoses and load-checks your stack against Stratus from the outside, so you know it works before you deploy. Then ship to AWS with Kanu.

Explore Preflight

Quick start

Running in under a minute.

Point the AWS CLI, any SDK, CDK or Terraform at localhost:4566. One binary, one data directory, and Docker only for Lambda and the real database, cache and Kafka engines.

stratus                 # terminal 1: AWS on localhost:4566

export AWS_ENDPOINT_URL=http://localhost:4566
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test
export AWS_DEFAULT_REGION=us-east-1
aws s3 mb s3://demo     # terminal 2: use it like AWS