awskit-s3-sim provides a deterministic in-memory S3 implementation for tests. Use it when you want S3-shaped behavior without creating buckets, opening network connections, or depending on a local service.
It implements the synchronous Awskit_s3.S client shape and does not perform network IO. It is a simulator for tests and documentation workflows, not live AWS coverage and not a wire-protocol authority.
The public entrypoint is Awskit_s3_sim. The supported simulator surface and security policy are documented in SUPPORT.md and SECURITY.md.
Awskit_s3_sim includes object, bucket, multipart, and presigned operation modules matching runtime-backed S3 clients. It also exposes helpers for common test needs:
let credentials =
Awskit.Credentials.create_exn
~access_key_id:"AK"
~secret_access_key:"SK"
()
in
let clock = Awskit_s3_sim.Clock.create () in
let store = Awskit_s3_sim.create_store ~clock () in
let conn = Awskit_s3_sim.connect store ~credentials in
let bucket = Awskit_s3.Bucket_name.of_string_exn "test-bucket" in
let key = Awskit_s3.Object_key.of_string_exn "hello.txt" in
ignore
(Awskit_s3_sim.Bucket.create conn ~bucket ()
|> Result.get_ok);
ignore
(Awskit_s3_sim.Object.put_string conn
~bucket
~key
~contents:"hello" ()
|> Result.get_ok)