Fake AWS server for tests

fakecloud is a free, open-source fake AWS server for integration tests. Single binary, port 4566, any AWS SDK in any language. No account, no auth token, no paid tier.

Need a fake AWS server to point your tests at? That's what fakecloud is.

curl -fsSL https://raw.githubusercontent.com/faiscadev/fakecloud/main/install.sh | bash
fakecloud

Listens on http://localhost:4566. Any AWS SDK in any language points at it and it responds like AWS.

What "fake AWS server" means here

Services covered

S3, SQS, SNS, DynamoDB, Lambda, IAM, STS, KMS, Secrets Manager, SSM, CloudWatch Logs, CloudFormation, EventBridge, EventBridge Scheduler, SES (v2 + v1 inbound), Cognito User Pools, Kinesis, RDS, ElastiCache, Step Functions, API Gateway v2, Bedrock, Bedrock Runtime.

Full matrix: fakecloud.dev/docs/services.

Minimal example

Node.js

process.env.AWS_ENDPOINT_URL = "http://localhost:4566";
process.env.AWS_ACCESS_KEY_ID = "test";
process.env.AWS_SECRET_ACCESS_KEY = "test";
process.env.AWS_REGION = "us-east-1";

import { S3Client, CreateBucketCommand } from "@aws-sdk/client-s3";
const s3 = new S3Client({});
await s3.send(new CreateBucketCommand({ Bucket: "hello" }));

Python

import boto3
s3 = boto3.client("s3",
    endpoint_url="http://localhost:4566",
    aws_access_key_id="test",
    aws_secret_access_key="test",
    region_name="us-east-1")
s3.create_bucket(Bucket="hello")

Go

cfg, _ := config.LoadDefaultConfig(ctx,
    config.WithRegion("us-east-1"),
    config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("test", "test", "")),
    config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc(
        func(service, region string, opts ...interface{}) (aws.Endpoint, error) {
            return aws.Endpoint{URL: "http://localhost:4566"}, nil
        },
    )),
)
s3 := s3.NewFromConfig(cfg, func(o *s3.Options) { o.UsePathStyle = true })

AWS CLI

aws --endpoint-url http://localhost:4566 s3 mb s3://hello

How it differs from in-process mocks

Mocks (Moto, aws-sdk-client-mock, aws-sdk-mock) intercept SDK calls inside your test process and return fabricated responses. That's useful for tight unit tests but it does not execute cross-service wiring, does not run Lambda code, and is language-locked to the library's ecosystem.

A fake AWS server on localhost is language-agnostic (any SDK works), runs real cross-service flows, and executes Lambda code in real containers. If your tests ask "does my whole system actually work end-to-end," the server is the right tool.

Install options

Test-assertion SDKs

fakecloud ships introspection endpoints so your tests can assert on side effects (emails sent, messages published, Lambdas invoked) without writing raw HTTP:

import { FakeCloud } from "fakecloud";
const fc = new FakeCloud();

const { emails } = await fc.ses.getEmails();
expect(emails).toHaveLength(1);

await fc.reset();

SDKs for TypeScript, Python, Go, PHP, Java, Rust. Docs: fakecloud.dev/docs/sdks.