Testing Cloud Apps Locally with AWS Emulator
AWS has officially launched AWS Emulator, a local utility that allows engineering teams to build and test cloud applications directly on their local machines or in continuous integration (CI) environments. Without requiring an AWS account, active cloud provisioning, or temporary staging deployments, existing AWS SDK and AWS CLI requests are directed straight to the emulator, which executes requests locally and returns responses in milliseconds.
For technical leads, product managers, and developers, cloud integration testing has traditionally introduced difficult trade-offs. Relying on remote cloud environments forces teams to wait on slow deployment cycles while accumulating non-trivial cloud infrastructure bills. Conversely, relying heavily on hand-written local mocks creates dangerous drift, where local test passes hide schema mismatches and unexpected production failures.
By serving emulated AWS API endpoints that mirror official service models, AWS Emulator addresses these operational bottlenecks. Engineering teams can now shorten local inner-loop feedback cycles, isolate automated AI coding agents, and ensure pull requests pass rigorous integration checks before committing a single dollar to real cloud infrastructure.
Core Architecture and Execution Modes
The AWS Emulator operates as a lightweight program that serves an emulated AWS API endpoint locally. It runs without a graphical user interface, accepting standard SDK and CLI calls signed with credentials provided directly by the emulator. To integrate the tool into standard developer workflows, the software supports two distinct deployment modes: server mode and embedded mode.
In server mode, the emulator runs as a standalone server. Developers point their applications, scripts, or testing frameworks to it simply by configuring standard AWS environment variables to target the local endpoint URL. On Linux systems, installation is streamlined through native RPM or Debian packages. On macOS and Windows environments, teams run the emulator within a lightweight container built from a provided minimal Dockerfile.
For teams writing and testing Rust applications, embedded mode offers an even tighter integration loop. By adding the emulator as a dev-dependency, the emulator runs in-process inside the test binary itself. This eliminates the need to manage external process lifecycles, endpoint URLs, environment variables, or TLS certificates. Instead, Rust unit tests wire the emulator’s internal HTTP client directly into the AWS SDK client, spinning up an isolated instance per test. Building from source or executing embedded tests requires a Rust toolchain with Cargo and a C compiler such as GCC or clang, with source builds supported on Linux x86_64 and aarch64 architectures.
Eliminating Staging Costs and Drifted Mocks
Maintaining dedicated AWS accounts or staging stacks for developer branch testing creates ongoing cloud spending and security overhead. The AWS Emulator is released under the permissive CC0 1.0 Universal public domain dedication with no additional service fee. Teams incur cloud charges only when deploying applications to live AWS environments, making local testing completely free from API call costs or resource usage charges.
Beyond raw cost reduction, the emulator replaces fragile hand-written mocks that frequently drift out of sync with actual cloud behaviors. The emulated service interfaces are automatically generated directly from the official API models published by AWS—the exact same underlying models used to generate official AWS SDKs. As AWS releases new services or updates existing API structures, these definitions flow into the emulator.
For implemented operations, the emulator aims for full behavioral parity, yielding identical success responses for valid requests and matching error codes for invalid ones. When code attempts to invoke an API operation that has not yet been emulated, the software returns an HTTP 501 status code with an explicit NotImplemented error code. This ensures tests fail fast and clearly, preventing subtle integration bugs from slipping into production unnoticed.
Parallel Test Isolation and AI Agent Workflows
A major challenge with shared staging environments or centralized local test servers is state contamination. The AWS Emulator solves this by keeping all resource state strictly in memory until the process is terminated. Every copy of the emulator started on a machine runs with its own isolated port, separate credentials, and private in-memory state store.
This isolated architecture makes parallel execution trivial across continuous integration jobs, local test suites, and automated AI coding agents. Multiple feature branches or automated test runners can run simultaneous integration tests against emulated resources like Amazon S3 buckets or Amazon DynamoDB tables without risks of state collision or test pollution.
For development workflows leveraging autonomous coding agents, the emulator provides a completely safe, offline testing environment. Teams using AWS CLI version 2.35.0 or later can register the emulator skill for their agents using the following toolkit command:
aws agent-toolkit add-skill --skill-name aws-emulator --region us-east-1
Once configured, an agent can start a dedicated local emulator instance on a unique port, execute AWS SDK calls within a completely offline network sandbox, inspect return states or errors, and correct its code iteratively before ever raising a pull request.
Understanding API Fidelity and Service Coverage
Because AWS offers thousands of API operations across hundreds of services, behavioral fidelity between the emulator and real AWS infrastructure varies across the service catalog. AWS defines fidelity as how accurately the emulator replicates live service behaviors, assertion rules, and error states.
Fidelity is evaluated using automated test suites published in the aws-emulator-evaluation-suite GitHub repository. These tests run assertions against live AWS environments in the us-west-2 (Oregon) Region for regional services, and the us-east-1 (N. Virginia) Region for global services. Each release of the emulator publishes updated service fidelity scores, showing the exact ratio of passed fidelity tests out of the total suite for a given service.
Today, behavioral fidelity is highest for control plane APIs—operations responsible for creating, describing, updating, listing, and deleting cloud infrastructure resources. Data plane API parity—including putting or fetching S3 objects—and compatibility with infrastructure provisioning frameworks like Terraform, AWS CloudFormation, or the AWS CDK depend on the specific service being emulated. Developers can track specific API gaps in the repository’s issues/ directory, where un-emulated behaviors live under issues/things-that-do-not-work/ until resolved and moved to issues/things-that-now-work/.
Practical Takeaways for Engineering Teams
- Adopt Server Mode for Cross-Platform Teams: Use RPM or Debian packages on Linux machines, or run containerized instances via Docker on macOS and Windows to provide consistent local endpoints for developer tools.
- Leverage Embedded Mode for Rust Applications: Include the emulator as a
dev-dependencyin Rust projects to run isolated, in-process API tests without managing external services, ports, or environment variables. - Integrate Isolated Emulators in CI Pipelines: Spin up dedicated emulator instances on distinct ports for each CI job or pull request to execute integration suites without cloud credentials or leftover staging resources.
- Establish Safe AI Agent Workflows: Provide automated coding agents with local emulator instances so they can safely validate SDK interactions and fix errors offline without account access.
- Verify Service Fidelity Prior to Adoption: Review the official fidelity scores and check the
issues/things-that-do-not-work/folder in the project repository to confirm your required control and data plane APIs are supported.
Planning something like this? XORGEEK designs and builds web and mobile apps for teams in Japan and around the world. Talk to us.
Sources
- AWS Emulator is now available for building and testing AWS applications locally
- GitHub – aws/aws-emulator: AWS Emulator is a local emulator of the AWS APIs. · GitHub
- Fidelity in AWS Emulator – AWS Emulator
- Local AWS emulator for testing and CI | AWS Emulator
Photo by Mohammad Rahmani on Unsplash