Skip to content
cloudemu

Introduction

In-memory cloud service emulation for Go — real SDKs, no cloud.

cloudemu lets you point real aws-sdk-go-v2, azure-sdk-for-go, and cloud.google.com/go clients at an in-memory backend. Your production code runs unchanged: no mocks, no Docker, no cloud accounts, and calls complete in about 10 ms.

How it works#

cloudemu starts an HTTP server that speaks the actual cloud wire protocols — S3 REST, DynamoDB JSON-RPC, EC2 query, ARM JSON, GCP REST, Smithy CBOR. You point the SDK's endpoint at it; the SDK cannot tell it apart from s3.amazonaws.com.

main_test.go
cloud := cloudemu.NewAWS()
ts := httptest.NewServer(awsserver.New(awsserver.Drivers{
    S3: cloud.S3, DynamoDB: cloud.DynamoDB, /* ... */
}))

// Real aws-sdk-go-v2 client — only the endpoint changes.
client := s3.NewFromConfig(cfg, func(o *s3.Options) {
    o.BaseEndpoint = aws.String(ts.URL)
})
client.PutObject(ctx, &s3.PutObjectInput{ /* your real production code */ })

NOTE

The endpoint override is the only change between test and production configuration. Everything else — request signing, marshaling, retries — is the real SDK code path.

Comparison with alternatives#

ApproachCostSpeedReal SDKs
Real cloud (AWS/Azure/GCP)$$$Seconds
LocalStack / emulators$100 ms+✓ (requires Docker)
Hand-rolled mocksFreeFast✗ — rewrite every call site
cloudemuFree~10 ms✓ — no Docker, no rewrites

What's included#

  • SDK-compatible HTTP server — real SDK wire protocols across AWS, Azure, and GCP, spanning compute, storage, NoSQL and relational databases, serverless, Kubernetes, networking, monitoring, message queues, IAM, container registry, resource discovery, and provider-specific generative AI (Bedrock/SageMaker/Vertex AI) and Databricks
  • Three cloud providers — AWS, Azure, and GCP in one binary
  • Realistic behaviors — state machines, auto-metrics, alarm evaluation, FIFO dedup, DLQs, TTL expiry
  • Chaos engineering — inject failures, latency spikes, and throttling in time-bounded windows
  • Network topology — evaluate real reachability across VPCs, peering, security groups, ACLs, and routes
  • Portable Go API — direct in-process calls covering every service category, including the seven not yet SDK-compatible (DNS, load balancer, notification, event bus, cache, secrets, logging)
  • Cross-cutting features — call recording, metrics, error injection, rate limiting, fake clock, latency simulation
  • Zero runtime dependencies

Where to go next#

On this page

On this page