talira

A mock of the Amazon S3 API for local integration testing

open sourceApache-2.0self-hostablefree

S3Mock is Adobe's lightweight server that implements a subset of the Amazon S3 API for local integration testing, so tests don't need real S3 buckets. It runs as a Docker image (recommended), through Testcontainers, as a JUnit 5 extension or a TestNG listener, and works with the AWS CLI, SDKs and plain HTTP. It covers the common bucket and object operations, with experimental support for the S3 Vectors API.

Problems it solves

  • test code that uses Amazon S3 without a real AWS bucket
  • run a fake S3 server in Docker for my CI tests
  • an S3 mock for JUnit integration tests

Features

  • S3 API subset for integration tests
  • Docker image, Testcontainers, JUnit 5 extension and TestNG listener
  • works with the AWS CLI and SDKs
  • experimental S3 Vectors API support

Limitations

  • Path-style URLs only (localhost:9090/bucket/key), not virtual-hosted style.1
  • Accepts presigned URLs without checking their expiry, signature or method.1
  • Testing only: it lacks the security features needed in production, and KMS keys perform no real encryption.1

Alternatives

The same job

These do what S3Mock does.

  1. LocalStack Emulates AWS, Snowflake and Azure on your own machine for local development and CI
  2. Floci Free, open source local AWS emulator and drop-in LocalStack replacement

Compare S3Mock with the top 3