Automerge storage adapter for AWS S3. More information here.
If your project will have a large number of users and, accordingly, operations, the price of S3 may be significant due to the large number of PUT requests that are charged. Please take this into account.
npm install --save @aws-sdk/client-s3 automerge-repo-storage-s3
import { WebSocketServer } from 'ws'
import { NodeWSServerAdapter } from '@automerge/automerge-repo-network-websocket'
import { AutomergeRepoStorageS3 } from 'automerge-repo-storage-s3'
import { Repo } from '@automerge/automerge-repo'
const wss = new WebSocketServer({ port: 8080 })
const adapter = new NodeWSServerAdapter(wss)
const storage = new AutomergeRepoStorageS3('automerge-s3-test', 'us-east-1')
new Repo({
network: [adapter],
storage,
})
If you use this package and find some issues, I would appreciate your pull requests. It has not been 100% tested.