Simulators
S3 simulator
s3-twin is a local, stateful simulator of Amazon S3’s REST API for testing storage code: buckets, objects under any key, listings, multipart uploads, copies, tagging, batch deletes, conditional and Range requests and request checksums. Each behavior it serves is S3’s own unless a Differs from S3 line beside it or Limitations says otherwise, and one marked (unconfirmed) has not yet been compared with S3. The simulator never calls AWS, sends no event notification and fills no bucket in a real account.
Quickstart
Install the CLI, sign in and boot the simulator with RYSTIC_URL pointing at it.
On Pro you sign in with an API key from your account .
curl -fsSL https://www.rystic.ai/install.sh | sh
rystic login rys_… # your API key
export RYSTIC_URL=$(rystic run s3-twin -d --port 0 --scenario s3_static_site --json | jq -r .data.url)
curl -s "$RYSTIC_URL/_rystic/version"
# -> {..."product":"s3-twin"...}
On Enterprise, the licensed edition signs in with a license file in place of the key: rystic login ./rystic-license.json (licensing ).
First calls
S3 takes a signed request, and curl 7.75 or later signs each one with --aws-sigv4, here under AWS’s documented example key pair. List the assets in acme-demo-site, put an object under a key that holds slashes and read it back:
s3curl() { curl -s --aws-sigv4 'aws:amz:us-east-1:s3' --user 'AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY' "$@"; }
s3curl "$RYSTIC_URL/acme-demo-site?list-type=2&prefix=assets/" | grep -oE '<Key>[^<]*|<KeyCount>[0-9]+'
# -> <Key>assets/app.css
# -> <Key>assets/app.js
# -> <Key>assets/logo.svg
# -> <KeyCount>3
s3curl -X PUT -H 'Content-Type: text/plain' --data hello "$RYSTIC_URL/acme-demo-site/reports/2026/hello.txt" -w '%{http_code}\n'
# -> 200
s3curl "$RYSTIC_URL/acme-demo-site/reports/2026/hello.txt"
# -> hello
check.sh runs a round trip on its own simulator.
Connect your client
Point an AWS SDK at $RYSTIC_URL with three settings: the endpoint, path-style addressing (the bucket in the path, not the host name) and any access key pair. Python:
import os
import boto3
from botocore.config import Config
s3 = boto3.client(
"s3",
endpoint_url=os.environ["RYSTIC_URL"],
region_name="us-east-1",
aws_access_key_id="AKIAIOSFODNN7EXAMPLE",
aws_secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
config=Config(s3={"addressing_style": "path"}),
)
s3.put_object(Bucket="acme-demo-site", Key="reports/2026/hello.txt", Body=b"hello")
Node:
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
const s3 = new S3Client({
endpoint: process.env.RYSTIC_URL,
region: "us-east-1",
forcePathStyle: true,
credentials: {
accessKeyId: "AKIAIOSFODNN7EXAMPLE",
secretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
},
});
await s3.send(new PutObjectCommand({ Bucket: "acme-demo-site", Key: "reports/2026/hello.txt", Body: "hello" }));
Go:
package main
import (
"context"
"os"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
func main() {
cfg, _ := config.LoadDefaultConfig(context.TODO(),
config.WithRegion("us-east-1"),
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(
"AKIAIOSFODNN7EXAMPLE", "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "")),
)
client := s3.NewFromConfig(cfg, func(o *s3.Options) {
o.BaseEndpoint = aws.String(os.Getenv("RYSTIC_URL"))
o.UsePathStyle = true
})
client.ListBuckets(context.TODO(), &s3.ListBucketsInput{})
}
The AWS CLI v2 takes the endpoint and credentials from the environment and path-style addressing from its config file:
printf '[default]\nregion = us-east-1\ns3 =\n addressing_style = path\n' > aws-config
export AWS_CONFIG_FILE=$PWD/aws-config AWS_ENDPOINT_URL=$RYSTIC_URL AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY AWS_DEFAULT_REGION=us-east-1
aws s3 ls s3://acme-demo-site/ --recursive
Other SDKs take the same three settings (endpoint or baseEndpoint, forcePathStyle or usePathStyle, static credentials). The simulator logs each request your client sends. When a call goes wrong, what you see names the cause:
| You see | It means |
|---|---|
| No log lines | Your client is not reaching the simulator. |
A NoSuchBucket that names your key’s first segment, or the response of another operation than the one you called | The SDK put the bucket in the host name (my-bucket.localhost), which the simulator does not read on an endpoint override. Set path-style, or use virtual-hosted addressing. |
403 RequestTimeTooSkewed | Your machine’s clock is more than 15 minutes off. |
501 NotImplemented | Your client called an operation the simulator does not serve (Coverage). |
Under --intercept (Intercept), S3’s global host and its host in each AWS region, standard or dual-stack, reach the simulator with their bucket subdomains, so a client keeps the region it is set to. S3’s other hosts, such as a FIPS or access point host, go to AWS, or are refused under --strict. Virtual-hosted addressing shows both.
No client has been checked against this simulator yet.
Auth
The simulator accepts a request signed with AWS Signature Version 4 under any access key pair, in the Authorization header or as a presigned URL. It checks the signature’s shape and freshness, as S3 does before it looks the key up.
Differs from S3: the simulator holds no key and never verifies a signature, in a header or a presigned URL, so a request signed with the wrong secret is not caught.
The simulator checks a signed request in the order S3 does and returns the response of the first check that fails:
| The request | The simulator returns |
|---|---|
AWS4-HMAC-SHA256 with no X-Amz-Date or Date it can parse | 403 AccessDenied (AWS authentication requires a valid Date or x-amz-date header) |
X-Amz-Date (else Date) more than 15 minutes from now, either way, whatever the header’s shape | 403 RequestTimeTooSkewed |
With a fresh date: AWS4-HMAC-SHA256 without exactly one well-formed Credential (<key>/<YYYYMMDD>/<region>/<service>/aws4_request, its day matching X-Amz-Date’s), SignedHeaders and 64 lowercase hex digits for Signature | 400 AuthorizationHeaderMalformed |
No Authorization and no presigned query, on a bucket that does not exist | 404 NoSuchBucket (a HEAD: 404 with no body) |
No Authorization and no presigned query, on ListBuckets (GET /) | 307 Temporary Redirect with no body |
No Authorization and no presigned query, or another scheme, on CreateBucket, and on PutObject, GetObject and CompleteMultipartUpload once what they address exists | 403 AccessDenied |
On a bucket that exists, most other operations serve a request with no credential, a known issue (Limitations).
Differs from S3: S3’s 307 also names Location: https://aws.amazon.com/s3/. The simulator’s names none, since it links nowhere outside itself.
A static Authorization header does not work: it goes stale 15 minutes after it was signed, and a placeholder value fails the shape check. Sign each request, as an SDK or curl --aws-sigv4 does. Freshness is judged by your machine’s real clock, never the simulator’s. POST /_rystic/clock moves the times the simulator stamps on what it stores, not what it accepts as fresh. So a scenario pinned at 2026-02-01 still takes a request signed a second ago.
API version
The simulator serves S3’s REST API at its one version, 2006-03-01, the XML namespace every response carries, and no request header or parameter selects another. There is nothing to pin: an SDK release of any age talks to the same surface.
Errors and limits
Error format
Every S3 error is an XML <Error> document, so an SDK raises the exception it raises against S3. It carries Code, Message and RequestId, and most also carry HostId. An error on a HEAD request returns the status with no body.
Three errors carry only Code and Message, and a wrong Content-MD5 is stored rather than refused (Limitations). An unserved route returns the simulator’s own 404.
Rate limits
Amazon S3 supports at least 3,500 PUT, COPY, POST or DELETE requests or 11,000 GET or HEAD requests a second for each partitioned prefix of the object keys. It raises that rate as traffic grows and may return 503 SlowDown while it scales. That is a floor rather than a fixed limit, so this simulator records no rate limit.
Network profiles return an error you choose, such as 503 SlowDown; the simulator throttles no bucket or prefix on its own.
Differs from S3: the simulator never returns 503 SlowDown on its own.
rate_limits: real turns nothing on here.
Pagination
Each S3 listing takes a page size and returns IsTruncated with the marker that fetches the next page:
| Operation | Page size | Next page |
|---|---|---|
ListBuckets (GET /) | max-buckets; every bucket without it | send ContinuationToken back as continuation-token |
ListObjectsV2 (list-type=2) | max-keys, default 1,000, cap 1,000 (unconfirmed) | send NextContinuationToken back as continuation-token |
ListObjects | max-keys, default 1,000, cap 1,000 (unconfirmed) | marker; NextMarker is returned only with a delimiter |
ListObjectVersions (?versions) | max-keys, default 1,000, no cap (Limitations) | key-marker and version-id-marker from NextKeyMarker and NextVersionIdMarker |
ListMultipartUploads (?uploads) | max-uploads, default 1,000, cap 1,000 (unconfirmed) | key-marker and upload-id-marker from NextKeyMarker and NextUploadIdMarker |
ListParts (?uploadId) | max-parts, default 1,000, cap 1,000 (unconfirmed) | part-number-marker from NextPartNumberMarker |
/_rystic/page-cap caps a listing’s page-size parameter, such as max-keys.
Idempotency
Not applicable: the simulator reads no idempotency key on any route, so a re-sent PutObject replaces the object and a re-sent DeleteObject returns 204.
Coverage
Out of scope on purpose: ACL writes; every bucket setting but versioning and tags; an object’s legal hold, retention, restore and select. A call to one of them, such as a bucket’s policy, CORS, lifecycle, encryption, website or replication, returns 501 NotImplemented and changes nothing. Only DeleteObject addresses an older version by versionId.
32 routes, counted from the simulator’s route table.
Show all operations
| Resource | Operations |
|---|---|
| Bucket (21) | GET /; GET, PUT, DELETE, HEAD /{Bucket}; GET /{Bucket}?acl; GET /{Bucket}?list-type=2; GET /{Bucket}?location; GET, PUT, DELETE /{Bucket}?tagging; GET /{Bucket}?uploads; GET, PUT /{Bucket}?versioning; GET /{Bucket}?versions; GET, HEAD /{Bucket}/{Key+}; GET /{Bucket}/{Key+}?acl; GET /{Bucket}/{Key+}?attributes; GET /{Bucket}/{Key+}?tagging; GET /{Bucket}/{Key+}?uploadId |
| Multipart upload (2) | DELETE /{Bucket}/{Key+}?uploadId; POST /{Bucket}/{Key+}?uploads |
| Object (7) | POST /{Bucket}?delete; POST, PUT, DELETE /{Bucket}/{Key+}; PUT, DELETE /{Bucket}/{Key+}?tagging; PUT /{Bucket}/{Key+} [x-amz-copy-source] |
| Upload part (2) | PUT /{Bucket}/{Key+}?partNumber&uploadId; PUT /{Bucket}/{Key+}?partNumber&uploadId [x-amz-copy-source] |
Feed effects. No write emits a feed effect; watch requests instead. Each call appears on the event feed (/_rystic/events) as a request event, and reading the record back shows what it changed.
Scenarios
The simulator ships 5 scenarios; the quickstart boots s3_static_site.
| Scenario | What it is for | What it seeds | Clock |
|---|---|---|---|
s3_bucket_farm | Six buckets in six regions, for auditing a whole account | bucket 6, object 3, object_version 3 | 2026-02-01T00:00:00Z |
s3_encrypted_vault | A versioned vault bucket, acme-demo-vault, with MFA delete, for encryption and integrity reads | bucket 1, object 4, object_version 4 | 2026-02-01T00:00:00Z |
s3_fresh_bucket | One empty bucket, acme-demo-scratch, so a listing returns no keys and the first write stands out | bucket 1 | 2026-02-01T00:00:00Z |
s3_static_site (default) | A public website bucket, acme-demo-site, beside its access-log bucket, for prefix listing, HEAD and GET | account 1, bucket 2, object 9, object_version 9 | 2026-02-01T00:00:00Z |
s3_versioned_archive | A versioning-enabled archive bucket, acme-demo-archive, for version listings and delete markers | bucket 1, object 2, object_version 6 | 2026-02-01T00:00:00Z |
What each scenario holds:
s3_bucket_farm:- Every versioning state (unset, Suspended, Enabled and Enabled with MFA delete).
- Tags on five of them.
- A marker object,
meta/region.txt, in three.
s3_encrypted_vault:- Four objects in four storage classes (
STANDARD_IA,INTELLIGENT_TIERING,GLACIERandDEEP_ARCHIVE). - Two encrypted with
aws:kmsand two withAES256. - Checksums
CRC32,SHA1andSHA256on three of them. - No checksum on the fourth.
- Four objects in four storage classes (
s3_fresh_bucket:- Tagged and in
us-west-2. - Unversioned, with no version rows.
- Tagged and in
s3_static_site:- Seven site keys (HTML, CSS, JS, an SVG,
robots.txtand a zero-byte redirect stub). - Two access logs.
- Unversioned, with null version rows.
- A second account,
deploy-bot, which the timeline acts as.
- Seven site keys (HTML, CSS, JS, an SVG,
s3_versioned_archive:reports/2025-q3.csv, overwritten once.reports/2025-q4.csv, with one version.notes/draft.md, whose latest version is a delete marker over two older ones, so it has no current object.
Boot one by name, or load one into a running simulator:
rystic run s3-twin -d --port 0 --scenario s3_static_site
curl -s -X POST "$RYSTIC_URL/_rystic/scenario" -d '{"name":"s3_static_site"}'
What the scenarios do not hold
- No multipart upload in progress.
ListMultipartUploadsreturns an empty list in every scenario: start one to have a subject (Multipart uploads and checksums). - No echoed checksum on a seeded object.
HEADwithx-amz-checksum-mode: ENABLEDreturns itsx-amz-checksum-typeand encryption headers but nox-amz-checksum-*value. An object you put with a checksum echoes it. - No bucket on an empty boot. Without
--scenariothe simulator boots an empty account, so every object call returnsNoSuchBucketuntil you create a bucket or seed one.
The static site’s timeline
Moving the clock plays s3_static_site’s timeline as deploy-bot, a second account, 210987654321:
| At | deploy-bot |
|---|---|
| +10m | copies index.html to releases/2026-02-01/index.html |
| +12m | puts a new assets/app.js |
| +15m | deletes legacy.html |
| +1h | puts an access log under acme-demo-site-logs/access/ |
| +2h | starts a multipart upload of releases/2026-02-01/bundle.tar.gz |
| +2h5m | uploads its one part |
| +2h10m | completes the upload |
Seeding state
A seed takes six registers, one for each kind of record:
| Register | Holds | Keyed by |
|---|---|---|
state_bucket | buckets | Name |
state_object | objects, each body as body_b64 | Bucket and Key |
state_object_version | rows of the version listing | Bucket, Key and VersionId |
state_multipart_upload | uploads in progress | Bucket, Key and UploadId |
state_upload_part | an upload’s parts | Bucket, Key, UploadId and PartNumber |
state_account | the one account the simulator acts as | AccountId |
Seed a bucket with an object into the running simulator and read it back:
curl -s -X POST "$RYSTIC_URL/_rystic/seed" -d '{"state_bucket": {"my-bucket": {"Name": "my-bucket", "LocationConstraint": "", "TagSet": [{"Key": "env", "Value": "test"}]}}, "state_object": {"my-bucket/reports/hello.txt": {"Bucket": "my-bucket", "Key": "reports/hello.txt", "ContentType": "text/plain", "body_b64": "aGVsbG8=", "StorageClass": "STANDARD"}}}' -w '%{http_code}\n'
# -> 204
s3curl "$RYSTIC_URL/my-bucket/reports/hello.txt"
# -> hello
Scenarios and seeding covers the seed route’s empty 204, the 400s it returns for what it refuses, boot files and the seed gate.
Features
Each feature has its own page:
- Multipart uploads and checksums: Multipart uploads start, take parts, list, complete and abort as S3’s do, and the request checksums SDKs send by default are verified, stored and echoed.
- Presigned URLs: SigV4 and SigV2 presigned URLs stand in for the Authorization header, checked for shape and expiry but never for their signature.
- Swagger UI: Swagger UI over S3’s published API and the simulator’s control routes; it can’t sign, so Try it out reaches only what the simulator serves unsigned.
- Versioned buckets: Buckets with versioning enabled list their versions and delete markers, and a delete there adds a marker over the current object.
- Virtual-hosted addressing: Every route is also served with the bucket in the host name, and the CLI’s gateway routes S3’s own hostnames in every AWS region to the simulator.
Determinism and reset
Upload ids and request ids come from sequences, and a PutObject’s ETag is the MD5 of its body. On an empty boot the clock starts at the moment the simulator started, so pin it with rystic run --clock <RFC3339>, which every reset returns to.
Reset and determinism covers reset, the clock and the RNG.
Limitations
Known issues.
HeadObjectandGetObjecton a completed multipart upload returnx-amz-checksum-type: FULL_OBJECT, where S3 returnsCOMPOSITE.- In a versioning-enabled bucket, a PUT writes a
nullversion rather than a new one. It returns nox-amz-version-id, and the new row is listed as latest beside the row that was latest (unconfirmed). - A path or method that no route matches, such as an unknown
/_rystic/route, returns 404 with a JSONmessage, where S3 returns its XML<Error>document. - A request with no credential is served on most operations of a bucket that exists, deletes included. S3 returns 403
AccessDeniedthere, or 404NoSuchUploadon an upload that does not exist (unconfirmed). 501 NotImplemented, a checksumBadDigestandEntityTooLargecarry onlyCodeandMessage, andEntityTooLargesends nox-amz-request-idheader. A wrongContent-MD5is stored with 200, where S3 returns 400BadDigest.ListObjectVersionsreturns as many versions asmax-keysasks for, where S3 returns at most 1,000.
Beyond the known issues, 79 of the 111 operations in the published spec are not served, 35 documented responses have no test yet and 137 behaviors are not modeled. The details follow.
Show all limitations
Not served. 79 of the 111 operations in the published spec are not served.
- acl, 2 of 4 served:
PUT /{Bucket}?acl,PUT /{Bucket}/{Key+}?acl - Not served at all: abac (2), accelerate (2), analytics (4), annotation (4), cors (3), encryption (4), intelligent-tiering (4), inventory (4), legal-hold (2), lifecycle (3), logging (2), metadataAnnotationTable (1), metadataConfiguration (3), metadataInventoryTable (1), metadataJournalTable (1), metadataTable (3), metrics (4), notification (2), object-lock (2), ownershipControls (3), … and 13 more
Not tested. 162 tests compare the simulator with the real service. 35 documented responses have no test yet, and 24 of them need a credential our test account doesn’t hold (403 ×24). The other 11:
| Operation | Status | Why |
|---|---|---|
DELETE /{Bucket} | 409 | no known request reaches it |
GET / | 307 | no request a client sends provokes it |
POST /{Bucket}/{Key+} | 400 | a well-formed request does not provoke it (2 cases) |
PUT /{Bucket} | 409 | no known request reaches it (2 cases) |
PUT /{Bucket}/{Key+} | 400 | a well-formed request does not provoke it |
PUT /{Bucket}/{Key+}?partNumber&uploadId [x-amz-copy-source] | 400 | no known request reaches it |
PUT /{Bucket}/{Key+}?tagging | 400 | no known request reaches it |
PUT /{Bucket}?tagging | 400 | no known request reaches it |
PUT /{Bucket}?tagging | 409 | no known request reaches it |
Not modeled. Behavior the simulator does not model, by operation:
- The in-scope surface is the general-purpose bucket at the s3.{region} endpoint. (
DELETE /{Bucket}) - Repeated aborts: the description notes an abort may need to be issued multiple times when part uploads are in progress; that concurrency behavior is not modeled. (
DELETE /{Bucket}/{Key+}?uploadId) - Directory buckets: the description states the operation is not supported for them; the refusal’s status and error code are not documented here. (
DELETE /{Bucket}?tagging) - The exact Message text of the AccessDenied body for an expected-bucket-owner mismatch is not quoted by the operation; the generic ‘Access Denied’ from the Error code table is used. (
DELETE /{Bucket}?tagging) - Directory buckets are out of scope: the operation is not supported for them. (
GET /) - Whether ContinuationToken/Prefix/BucketRegion are echoed when the corresponding request parameter is absent is only partly documented (‘if the request contains at least one valid parameter, it is included’), so their presence rules are left unmodeled. (
GET /) - Encoding-type=url: the exact percent-encoding applied to returned keys and the echoed EncodingType element. (
GET /{Bucket}) - 416 InvalidRange for an unsatisfiable Range, and 400 InvalidArgument for an out-of-range partNumber: named in the service-wide error table but not in this operation’s documented responses. (
GET /{Bucket}/{Key+}) - Response header overrides via response-cache-control/response-content-disposition/response-content-encoding/response-content-language/response-content-type/response-expires: a 200 variant whose headers differ from the stored metadata. (
GET /{Bucket}/{Key+}) - partNumber ranged reads and the x-amz-mp-parts-count header: multipart upload is out of scope. (
GET /{Bucket}/{Key+}) - ObjectParts (multipart) sub-document, x-amz-max-parts and x-amz-part-number-marker paging: no multipart-upload operation is in scope, so parts can never be produced. (
GET /{Bucket}/{Key+}?attributes) - SSE-C request headers (x-amz-server-side-encryption-customer-*) and the documented 400 for sending x-amz-server-side-encryption on a GET-class request: not listed in this operation’s responses and not provisionable here. (
GET /{Bucket}/{Key+}?attributes) - X-amz-request-payer / x-amz-request-charged (Requester Pays) behavior. (
GET /{Bucket}/{Key+}?attributes) - Access point aliases, ARNs and S3 on Outposts hostnames for the {Bucket} label; directory buckets (the operation is not supported for them). (
GET /{Bucket}/{Key+}?tagging) - The x-amz-version-id response header’s value on a versioned bucket. (
GET /{Bucket}/{Key+}?tagging) - X-amz-request-payer / Requester Pays charging behavior. (
GET /{Bucket}/{Key+}?tagging) - Directory buckets, for which this operation is not supported. (
GET /{Bucket}?acl) - The bucket owner enforced Object Ownership setting, which returns the bucket-owner-full-control ACL owned by the creating account; the seeded bucket’s ownership setting is unknown. (
GET /{Bucket}?acl) - Encoding-type=url percent-encoding of Delimiter, Prefix, Key and StartAfter in the response is unmodeled. (
GET /{Bucket}?list-type=2) - Directory-bucket (Zonal endpoint, CreateSession) semantics are out of scope for the modeled general-purpose bucket. (
POST /{Bucket}/{Key+}) - … and 117 more
By design.
-
Objects up to 64 MiB.
PutObject,UploadPartandCompleteMultipartUploadtake bodies up to 64 MiB, and a larger body returns400 EntityTooLarge.Differs from S3: S3 takes 5 GiB per PUT and per part.
-
One owner per account. A seeded bucket belongs to whichever account calls. A bucket you create belongs to the account that creates it:
123456789012, or210987654321asdeploy-bot. On a seeded bucket,GetBucketAclandGetObjectAclreturn one synthetic canonical user id asOwnerand soleFULL_CONTROLgrantee. -
Nothing changes on its own. Nothing expires, transitions storage class or replicates.
Release notes: Changelog