How a Local AWS Emulator Tests Cloud Code
A generated local HTTPS server speaks AWS API shapes so agents can test code without an account.
Reviewed by Abhijith N M · 24 October 2026 · Editorial standards
AWS published a local emulator: a program you run on your own machine that answers HTTPS requests the way AWS services do. It covers more than 200 services, and you don't need an AWS account to use it. The trick is where the behaviour comes from. AWS describes each service's API in public Smithy models. Smithy is AWS's interface definition language: a machine-readable file listing every operation, every input and output field, and the wire format. Because those models are public, a generator can read them and synthesize a local HTTPS server that accepts the same request shapes and returns the same response shapes. So when your code calls a service, the emulator parses the request the way the real endpoint would and hands back a well-formed reply. A coding agent can write a function, run it against the local endpoint, and see whether the request it built is structurally valid, without credentials or a network round trip to AWS. Now the limits. The emulator keeps state in memory, so data disappears when the process stops. IAM, the permission system, is only partly emulated, so a call that succeeds locally may still be denied in a real account. Regions have gaps too. AWS publishes fidelity scores saying how closely each service matches, which is a hint to read before trusting a result. The practical split: this is a good harness for checking that your code speaks the API correctly, which is most of what an agent loop needs. It is not proof of production behaviour. A test that passes locally tells you the request shape is right, not that your permissions, region and persistence are.
How a Local AWS Emulator Tests Cloud Code — Visual Breakdown
import boto3
# Point the SDK at the local emulator instead of AWS.
# The endpoint URL is whatever your local emulator prints on startup.
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="demo-bucket")
s3.put_object(Bucket="demo-bucket", Key="hello.txt", Body=b"hi")
resp = s3.get_object(Bucket="demo-bucket", Key="hello.txt")
print(resp["Body"].read())
# State lives in memory: restart the emulator and the bucket is gone.Quick Concept Check
Test your understanding in 15 seconds
Why can a generator produce a working local server for over 200 AWS services?
Related Concepts
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.