An S3 adapter for Basin
Basin S3 is a S3 adapter for Basin. It provides a S3 compatible API that translates S3 requests into Basin transactions or requests. With that we're able to leverage any S3 client or tooling to make use of the Basin features.
The Basin S3 implementation is built on top of the s3s project. s3s
provides a trait, generated from aws-sdk-rust repository. By providing an implementation of that trait we can provide an HTTP service that "speaks S3".
You can start the server by running
cargo run --features binary -- --private-key [PRIVATE_KEY] --access-key AKEXAMPLES3S --secret-key SKEXAMPLES3S
In read-only mode, just omit the private key.
You can point the adapter to a specific Basin network by providing the --network
flag. By default, it points to testnet
. For development, you can use localnet
or devnet
.
Right now, for lack of a better option, the tests rely on a running 3-node localnet
network. So, make sure you have one running locally to run them.
Building the Docker image:
docker build -t basin-s3 .
Running it
docker run -dt \
-e HOST=0.0.0.0 \
-e ACCESS_KEY=S3EXAMPLEAK \
-e SECRET_KEY=S3EXAMPLESK \
-e PRIVATE_KEY=PRIVATE_KEY \
--name basin-s3 \
--network host \
basin-s3
note: --network=host
does not work on MacOS.
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
MIT AND Apache-2.0, © 2021-2024 Basin Network Contributors