An Amazon S3 API mock for testing object uploads.
Upload an export to a seeded bucket, then download it by key to check its bytes and content type. The trace records the PUT request.
object_uploadedCalls PUT /*/*
Starting records
buckets
- name
acme-exports
buckets / acme-exports / objects
- key
exports/ridgeway-robotics/2026-06/orders.csv
Connect your agent to the Amazon S3 mock
When ancha runs your agent, it sets:
AWS_ENDPOINT_URL_S3AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION
Point the client you already use at them.
import { S3Client, ListBucketsCommand } from '@aws-sdk/client-s3';
const s3 = new S3Client({ endpoint: process.env.AWS_ENDPOINT_URL_S3, forcePathStyle: true });
const { Buckets } = await s3.send(new ListBucketsCommand({}));Locally, ancha runs your agent as an ordinary process, so keep real Amazon S3 credentials out of its environment.
See all 25 endpoints
{Bucket}
/{Bucket}/{Bucket}/{Bucket}/{Bucket}/{Bucket}/{Key+}/{Bucket}/{Key+}/{Bucket}/{Key+}/{Bucket}/{Key+}/{Bucket}/{Key+} (x-amz-copy-source)/{Bucket}/{Key+}?partNumber&uploadId/{Bucket}/{Key+}?tagging/{Bucket}/{Key+}?tagging/{Bucket}/{Key+}?tagging/{Bucket}/{Key+}?uploadId/{Bucket}/{Key+}?uploadId/{Bucket}/{Key+}?uploadId/{Bucket}/{Key+}?uploads{Bucket}?delete
/{Bucket}?delete{Bucket}?list-type=2
/{Bucket}?list-type=2{Bucket}?location
/{Bucket}?location{Bucket}?tagging
/{Bucket}?tagging/{Bucket}?tagging/{Bucket}?tagging{Bucket}?uploads
/{Bucket}?uploadsversions
/Seed your own data
The data the Amazon S3 mock starts with on every run, cut to a few records. ancha twins seed amazon-s3 prints every field.
Full seed YAML
twins:
- amazon-s3
seed:
amazon-s3:
account:
id: "481516234200"
name: acme-production
buckets:
- name: acme-exports
created: -6000h
tags:
team: platform
env: production
objects:
- key: exports/ridgeway-robotics/2026-06/orders.csv
content: |
order_id,placed_at,warehouse,total_usd
A-20931,2026-06-02,reno,1840.5
A-21044,2026-06-09,reno,932
contentType: text/csv
modified: -3400h
storageClass: GLACIER
tags:
customer: ridgeway-robotics
retention: 400d
Check what your agent did
Checks YAML
checks:
- id: object_uploaded
trace:
called: PUT /*/*More docs and files tools
All 43 toolsAmazon S3 API mock FAQ
How do I test S3 uploads that must not overwrite an existing object?
Send PutObject with If-None-Match: *; Ancha returns PreconditionFailed when the key already exists. For an update to an existing object, If-Match checks its stored ETag and returns PreconditionFailed on a mismatch.
Does the S3 mock return folders and continuation tokens in ListObjectsV2?
With prefix and delimiter, Ancha groups matching keys into CommonPrefixes and returns individual objects in Contents. When max-keys leaves more entries, the response includes IsTruncated and NextContinuationToken; send that value as continuation-token to continue.
Can I check an agent that downloads only part of an S3 object?
A valid single Range such as bytes=0-99 returns the selected bytes with status 206 and a Content-Range header. A range that starts beyond the object's last byte returns InvalidRange.
Install the CLI and run your agent against the Amazon S3 mock.
Ancha is not affiliated with Amazon S3.