Open Source · MIT License

Zero-Cost Cloud Emulation
for Go

No cloud accounts. No Docker. No network calls.
Just go get and test.

main.go
// Create cloud providers — everything runs in memory
aws := cloudemu.NewAWS()
azure := cloudemu.NewAzure()
gcp := cloudemu.NewGCP()

// Use them exactly like real cloud SDKs
instances, _ := aws.EC2.RunInstances(ctx, config, 3)
AWS
Azure
GCP

48 services across 3 cloud providers — all in memory

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

Beyond Basic Mocks

cloudemu reproduces real cloud behaviors so your tests catch real issues

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

Same API, Every Provider

Switch providers by changing one line — your test code stays the same

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+