Amplify Storage Simulator (v1.11.8) is an S3 API simulator designed for local testing of AWS Amplify projects that use S3 storage. It implements a subset of S3 REST APIs (ListObjects, GetObject, PutObject, DeleteObject, etc.) using a local file system backend, enabling offline development without actual AWS credentials. Part of the AWS Amplify CLI monorepo, it is updated irregularly alongside Amplify CLI releases. Unlike mock AWS services such as localstack or moto, it is lightweight, Amplify-specific, and integrates seamlessly with Amplify's storage category. It ships TypeScript types and is ESM-only. Key differentiators: automatic Amplify resource path mapping, no Docker dependency, and direct integration with Amplify's local mock server.
npm install amplify-storage-simulatorVerified import paths — ran on the pinned version, not inferred.
Starts the storage simulator, uploads an object using an S3 client, and stops the simulator.
Change 'buckets: ["my-bucket"]' to 'buckets: [{ name: "my-bucket" }]'Do not use for security testing; implement your own authorization if needed.
If ETag validation is required, implement custom middleware to override responses.
Use 'await sim.start()' or chain with .then()
Fall back to single PutObject calls or use a full S3 emulator.
Replace 'sim.getPort()' with 'sim.port'
Always set client region to 'us-east-1' when using the simulator.
Ensure sim.start() is called and use 'localhost' (IPv4) or '127.0.0.1' as endpoint.
Use import statement: import { AmplifyStorageSimulator } from 'amplify-storage-simulator'Add the bucket to options.buckets array as '{ name: "my-bucket" }'Access 'sim.port' after start completes, or use 'await sim.start()' first.