AWS Launches Local Emulator for Offline Cloud API Testing
AWS has released AWS Emulator, a local program that emulates AWS APIs so developers can test software on their own machines or in CI without an AWS account. It works by pointing the AWS CLI or SDKs at a local endpoint via environment variables, also offering an embedded mode, and AWS explicitly scopes it to building and testing rather than production or security validation.
Related Entities
Full Report
Contents10 sections
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-1Server mode (CLI and any SDK)
- Linux: install the RPM or Debian package and run
aws-emulator. See Getting started on Linux. - Windows / macOS: run the emulator in a container built from a short Dockerfile. See Getting started with Docker.
Point your SDK at a running emulator by setting environment variables. See Pointing your AWS SDK at AWS Emulator.
Embedded mode (Rust tests)
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 for its build cost.
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-cost 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 the Docker path above.
Prerequisites
- A Rust toolchain with Cargo (install via rustup).
- A C compiler, such as GCC or clang. Some dependencies build C code.
- At least 100 GB of free disk for
target/. The workspace has one crate per AWS service, so a debug build of everything is large, and it grows as services are added. - A multi-core machine. A cold full build compiles every service crate, so the first build takes a while; fewer cores take proportionally longer. After that, rebuilding after a change to one service is much faster.
Build and run
cargo build -p aws-emulator-router
cargo run -p aws-emulator-routerThe emulator serves HTTPS on 127.0.0.1:9297 (self-signed certificate).
Embedded mode build cost
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(注:更多技术实现细节与完整 API 文档请查阅原项目 README)