aws-emulator README

The project's README from github.com/aws/aws-emulator. As one markdown file: README.md.

AWS Emulator README

AWS Emulator is a local emulator of the AWS APIs. You use it to test your software without calling AWS, on your own machine, on a development server, or in continuous integration (CI). You don’t need an AWS account. Your requests go to the emulator, not to AWS. So you work with emulated resources instead of AWS resources. AWS Emulator has no additional service fee. You pay only for AWS resources when you deploy on AWS.

The emulator is a local program that serves an AWS API endpoint. It has no graphical interface. After you start the emulator, you set environment variables to point the AWS CLI or an AWS SDK at its endpoint. Then you run your code as usual. In embedded mode, you pass the emulator’s HTTP client to your SDK instead.

AWS Emulator is for building and testing. Don’t use it for production workloads or to test security. See Security in AWS Emulator.

Documentation: AWS Emulator User Guide

Quick start

With an AI coding agent

Install the aws-emulator skill, then ask your agent to set up the emulator. This needs the AWS CLI version 2.35.0 or later. See Getting started with an AI coding agent.

aws agent-toolkit add-skill --skill-name aws-emulator --region us-east-1

Local process

To start the emulator as a local process, see Getting started. Point your SDK at a running emulator by setting environment variables. See Pointing your AWS SDK at AWS Emulator.

Embedded mode

Add the emulator as a dev-dependency and run it in-process, one isolated instance per test. There is no endpoint URL, certificate, or environment variable to set. Your test wires the emulator's HTTP client straight into the SDK client. See Getting started with embedded mode, and Building from source below.

Known issues

To see how closely each service matches AWS, check the fidelity scores published with each release on the releases page. To check whether your own project is expected to work, see Checking whether your project works with AWS Emulator.

Individual gaps are tracked in the repository's issues/ directory. APIs and behaviors that don't work yet are under issues/things-that-do-not-work/, and ones that have since been fixed move to issues/things-that-now-work/.

Building from source

You need this if you are modifying the emulator, running it from a checkout, or using embedded mode. Embedded mode compiles the emulator into your test binary, so the prerequisites and build guidance below apply to it too. Most other users install a prebuilt package instead (see Quick start). Building from source is supported on Linux (x86_64 and aarch64); on Windows and macOS, use Docker (see Getting started with Docker).

Prerequisites

Build and run

cargo build -p aws-emulator-router
cargo run   -p aws-emulator-router

The emulator serves HTTPS on 127.0.0.1:9297 (self-signed certificate).

Embedded mode build

Embedded mode compiles the emulator into your test binary, so your project's first cargo test builds the emulator's service crates alongside your own code. Budget a first build and target/ on the same order as building from source above, then fast incremental builds. Recommendation: reuse one CARGO_TARGET_DIR across projects, cache target/ (or use sccache) in CI, and pin the emulator to a release commit so it isn't rebuilt on every change.

Repository layout

.
├── Cargo.toml              # workspace: one member per service, plus the core crates
├── services/
│   └── service-<name>/     # ONE CRATE PER SERVICE
│       ├── smithy-model/   # <name>.json — the Smithy model that drives the wire protocol
│       ├── build.rs        # generates the service declaration from the model
│       ├── src/
│       │   ├── service.rs  # request routing and refusal overrides
│       │   ├── state.rs    # this service's in-memory state
│       │   └── ops/        # one file per operation
│       └── tests/
├── core/
│   ├── router/             # the emulator binary: mounts every service on one endpoint
│   └── embedded/           # the in-process (embedded mode) facade
├── vendor/                 # framework crates — do not edit (replaced on update)
└── issues/                 # tracked fidelity issues

Telemetry

AWS Emulator is configured to collect and report usage data to AWS, to gain insight into how AWS Emulator is used. Telemetry is on by default. AWS Emulator collects telemetry data with strict data minimization in mind, preventing identification or attribution to specific users, accounts, or organizations. Its records never include what’s in your requests or responses, your code, your credentials, or personal data. We don’t share telemetry with third parties.

For details on what is collected and how the data is handled, see Telemetry in AWS Emulator. To turn telemetry off, use one of the following options.

Use a command-line option

Start the emulator with the --telemetry option (short form -t) set to off. This setting applies only to that emulator process.

aws-emulator --telemetry off

In a container, add --telemetry off after the image name in the docker run command.

Use an environment variable

Set EMULATOR_TELEMETRY to off before you start the emulator. This setting applies to every emulator that you start from that shell.

EMULATOR_TELEMETRY accepts on, true, or 1 to turn telemetry on, and off, false, or 0 to turn it off. Values aren’t case sensitive. Any other value turns telemetry off, and the startup notice shows a warning.

export EMULATOR_TELEMETRY=off
aws-emulator

Use a configuration file

To turn telemetry off for every run on a machine, add these lines to the emulator settings file, config.toml. The file is ~/.aws/emulator/config.toml on Linux and macOS, and %USERPROFILE%\.aws\emulator\config.toml on Windows. To use a different file, set the EMULATOR_CONFIG environment variable to its path.

[telemetry]
enabled = false

Use the embedded configuration API

In embedded mode, turn off telemetry in the options that you pass when you create the emulator.

use aws_emulator_embedded::{AwsEmulatorEmbedded, EmbeddedOptions, Telemetry};

fn main() {
    let emulator = AwsEmulatorEmbedded::new(EmbeddedOptions::default().telemetry(Telemetry::Off));
    let _http_client = emulator.http_client();
}

You might build a tool that includes the emulator, such as a test framework that other people run. If you do, tell your users about telemetry and give them a way to turn it off. You can also ship your tool with telemetry off.

Reporting issues and contributing

We don't accept pull requests: AI agents keep the emulator up to date with AWS, with regular updates. See CONTRIBUTING.md for details.

License

This software is licensed under the CC0 1.0 Universal (CC0-1.0) License, except the code in the vendor/ directory, which is under the Apache License 2.0. See LICENSE for details, and vendor/README.md for the license of the code in vendor/.

aws-emulator (aws/aws-emulator)

Searching Database…

What is this?A local emulator of the AWS APIs. You use it to test your software without calling AWS, on your own machine, a development server, or in CI, and you don't need an AWS account.
Is it a library or a standalone program?Mainly a standalone program: it serves an AWS API endpoint and has no GUI. You can also embed it in Rust tests as a dev-dependency.
How do I get it running?On Linux, install the RPM or Debian package and run aws-emulator. On Windows or macOS, run it in a container built from a short Dockerfile. Then set environment variables so the AWS CLI or an AWS SDK points at its endpoint.
Do I need an AWS account or the AWS CLI?No AWS account is needed, since your requests go to the emulator. You do need the AWS CLI or an AWS SDK pointed at it. The AI-agent setup path requires AWS CLI version 2.35.0 or later.
What is it not for, and what does building it cost?It is for building and testing, not production workloads or security testing. Building from source or using embedded mode needs a Rust toolchain, a C compiler, and at least 100 GB of free disk, and the first build takes a long time.
Does it send any data anywhere?Yes, telemetry is on by default and reports usage data to AWS. Records never include your requests, responses, code, credentials, or personal data, and nothing is shared with third parties. You can turn it off with the --telemetry off option, the EMULATOR_TELEMETRY variable, or config.toml.
Are there any license catches?The code is CC0-1.0, which is public domain. The exception is the vendor/ directory, which is under the Apache License 2.0.
Can I use it inside Rust tests without starting a server?Yes. Embedded mode runs the emulator in-process, one isolated instance per test. There is no endpoint, certificate, or environment variable to set; you pass the emulator's HTTP client straight to your SDK client.
How closely does it copy real AWS behavior?Each release publishes fidelity scores per service on the releases page. Individual gaps are tracked in the repo's issues/ directory, and APIs that don't work yet are under issues/things-that-do-not-work/.
Does it cost anything to run?No. AWS Emulator has no additional service fee. You pay only for AWS resources when you deploy on AWS.
Creator
aws
Size
1.3 GB
Stars
9.1K
Age
2mo
Commits · 90 Days