Test against real cloud SDKs
without a real cloud.

Point aws-sdk-go-v2, azure-sdk-for-go, or cloud.google.com/go at a local httptest server. ~10ms per call.

aws-sdk-go-v2AWS SDKazure-sdk-for-goAzure SDKcloud.google.com/goGCP SDKcloudemuhttptest
Real Cloud SDKs Work Unchanged

Don't rewrite your tests. Repoint them.

cloudemu ships HTTP servers that speak the real wire protocols of aws-sdk-go-v2, azure-sdk-for-go, and cloud.google.com/go. Point the SDK's endpoint at a local httptest.NewServer and your existing production code runs unchanged against an in-memory backend. No mocks. No Docker. No accounts.

aws_test.go · aws-sdk-go-v2
import (
    awsserver "github.com/stackshy/cloudemu/server/aws"
    "github.com/aws/aws-sdk-go-v2/service/s3"
)

cloud := cloudemu.NewAWS()
ts := httptest.NewServer(awsserver.New(awsserver.Drivers{
    S3: cloud.S3, DynamoDB: cloud.DynamoDB, EC2: cloud.EC2,
    Lambda: cloud.Lambda, SQS: cloud.SQS,
}))

// Use the REAL aws-sdk-go-v2 client — only the endpoint changes.
client := s3.NewFromConfig(cfg, func(o *s3.Options) {
    o.BaseEndpoint = aws.String(ts.URL)
    o.UsePathStyle  = true
})
client.PutObject(ctx, &s3.PutObjectInput{ /* ... */ })
Storage / Compute / Database
S3, EC2, DynamoDB · Blob, VMs, Cosmos · GCS, GCE, Firestore
Serverless / Message Queue
Lambda, SQS · Functions, Service Bus · Cloud Functions, Pub/Sub
Networking / Monitoring
VPC, CloudWatch · VNet, Azure Monitor · VPC, Cloud Monitoring

Two ways to use cloudemu

Same in-memory backend. Pick the surface that fits your test code.

Portable Go API

All providers

Call cloudemu's Go interfaces directly. Every service in every domain is here from day one.

48services available
16 domains × 3 providers
cloud := cloudemu.NewAWS()
cloud.S3.PutObject(ctx, ...)
cloud.IAM.CheckPermission(ctx, ...)
cloud.SecretsManager.GetSecret(ctx, ...)
Portable API docs →
Real SDKs work here

SDK-Compat HTTP Server

In progress

Point real aws-sdk-go-v2 / azure-sdk-for-go / cloud.google.com/go at a local httptest server.

21services live
7 domains × 3 providers · 27 more in progress
ts := httptest.NewServer(awsserver.New(...))
client := s3.NewFromConfig(cfg, /* ... */)
client.PutObject(ctx, ...) // real SDK, in-memory backend
SDK-Compat docs →
StorageSDK
ComputeSDK
DatabaseSDK
NetworkingSDK
MonitoringSDK
ServerlessSDK
Message QueueSDK
IAMGo API
DNSGo API
Load BalancerGo API
NotificationGo API
Event BusGo API
Container RegistryGo API
CacheGo API
SecretsGo API
LoggingGo API
SDK = Live SDK-compat HTTP handler. Go API = Available via the Portable API; SDK-compat shipping in lockstep.

Why cloudemu?

Compare approaches to testing cloud-dependent code

FeatureReal CloudLocalStack / Emulatorscloudemu
Cost$$$$Free
SpeedSeconds100ms+~10ms
Works Offline
Docker Required
SetupAccount + CredentialsDocker + Configgo get
Realistic BehaviorPartial
Multi-Cloud
Use real SDKs unchanged

Beyond Basic Mocks

cloudemu reproduces real cloud behaviors so your tests catch real issues

Real Cloud SDKs

aws-sdk-go-v2, azure-sdk-for-go, and cloud.google.com/go work unchanged — point them at a local httptest.NewServer and your production code just runs.

Chaos Engineering

Inject service outages, latency spikes, probabilistic failures, and throttling in time-bounded windows. Retry and timeout paths get exercised every test run.

State Machines

VMs enforce valid lifecycle transitions. Illegal state changes return errors, just like real clouds.

Auto-Metrics

Launching a VM pushes CPU, Network, and Disk metrics to monitoring. Stop/terminate emit matching values.

Error Injection

Simulate failures deterministically: always, every Nth call, probabilistic, or first N calls.

Call Recording

Capture every API call with inputs, outputs, errors, and timing. Assert with fluent matchers.

Fake Clock

Control time for deterministic testing of TTL, deduplication windows, and alarm evaluation.

Zero Dependencies

Pure Go with no external dependencies. Only testify for tests. Works anywhere Go runs.

16 Service Categories

Every category is implemented for AWS, Azure, and GCP

Or use the Portable Go API

Same shape across AWS, Azure, and GCP — switch providers by changing one line

aws_setup.go
aws := cloudemu.NewAWS()

// Launch EC2 instances
instances, _ := aws.EC2.RunInstances(ctx, computedriver.InstanceConfig{
    ImageID:      "ami-0abcdef1234",
    InstanceType: "t3.large",
    Tags:         map[string]string{"env": "production"},
}, 3)

// Create S3 bucket and upload
aws.S3.CreateBucket(ctx, "app-data")
aws.S3.PutObject(ctx, "app-data", "config.yaml",
    []byte("port: 8080"), "text/yaml", nil)

// Push metrics to CloudWatch
aws.CloudWatch.PutMetricData(ctx, []mondriver.MetricDatum{
    {Namespace: "App", MetricName: "CPU", Value: 45.2},
})

Ready to get started?

Install cloudemu and start testing your cloud code in seconds

$go get github.com/stackshy/cloudemu

MIT License · Requires Go 1.25+