16 releases (9 breaking)

new 0.10.0 Apr 16, 2024
0.9.0 Mar 10, 2024
0.8.1 Dec 9, 2023
0.8.0 Oct 8, 2023
0.4.0 Mar 8, 2023

#634 in HTTP server

Download history 100/week @ 2023-12-22 210/week @ 2023-12-29 316/week @ 2024-01-05 522/week @ 2024-01-12 517/week @ 2024-01-19 617/week @ 2024-01-26 446/week @ 2024-02-02 634/week @ 2024-02-09 789/week @ 2024-02-16 680/week @ 2024-02-23 779/week @ 2024-03-01 1232/week @ 2024-03-08 615/week @ 2024-03-15 550/week @ 2024-03-22 580/week @ 2024-03-29 789/week @ 2024-04-05

2,786 downloads per month
Used in 5 crates (via htsget-test)

Apache-2.0

2.5MB
38K SLoC

s3s

Apache 2.0 licensed Unsafe Forbidden

S3 Service Adapter

crate version docs
s3s Crates.io Docs
s3s-aws Crates.io Docs
s3s-fs Crates.io Docs

This experimental project intends to offer an ergonomic adapter for building S3-compatible services.

s3s implements Amazon S3 REST API in the form of a generic hyper service. S3-compatible services can focus on the S3 API itself and don't have to care about the HTTP layer.

s3s-aws provides useful types and integration with aws-sdk-s3.

s3s-fs implements the S3 API based on file system, as a sample implementation. It is designed for integration testing, which can be used to mock an S3 client. It also provides a binary for debugging. Play it!

How it works

architecture diagram

The diagram above shows how s3s works.

s3s converts HTTP requests to operation inputs before calling the user-defined service.

s3s converts operation outputs or errors to HTTP responses after calling the user-defined service.

The data types, serialization and deserialization are generated from the smithy model in aws-sdk-rust repository. We apply manual hacks to fix some problems in smithy server codegen and make s3s ready to use now.

Security

S3Service and other adapters in this project have no security protection. If they are exposed to the Internet directly, they may be attacked.

It is up to the user to implement security enhancements such as HTTP body length limit, rate limit and back pressure.

Contributing

Sponsor

If my open-source work has been helpful to you, please sponsor me.

Every little bit helps. Thank you!

Dependencies

~11–25MB
~327K SLoC