datastore-s3
v12.0.2
Published
IPFS datastore implementation backed by s3
Downloads
8,552
Readme
datastore-s3
IPFS datastore implementation backed by s3
About
A Datastore implementation that stores data on Amazon S3.
Example - Quickstart
If the flag createIfMissing
is not set or is false, then the bucket must be created prior to using datastore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example.
import { S3 } from '@aws-sdk/client-s3'
import { S3Datastore } from 'datastore-s3'
const s3 = new S3({
region: 'region',
credentials: {
accessKeyId: 'myaccesskey',
secretAccessKey: 'mysecretkey'
}
})
const store = new S3Datastore(
s3,
'my-bucket',
{ path: '.ipfs/datastore', createIfMissing: false }
)
Example
Using with Helia
See [examples/helia](./examples/helia) for a full example of how to use Helia with an S3 backed datastore.
Install
$ npm i datastore-s3
Browser <script>
tag
Loading this module through a script tag will make its exports available as DatastoreS3
in the global namespace.
<script src="https://unpkg.com/datastore-s3/dist/index.min.js"></script>
API Docs
License
Licensed under either of
- Apache 2.0, (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
- MIT (LICENSE-MIT / http://opensource.org/licenses/MIT)
Contribute
Contributions welcome! Please check out the issues.
Also see our contributing document for more information on how we work, and about contributing in general.
Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.