Skip to main content

@swamp/s3-datastore

v2026.04.28.4

Store data in an Amazon S3 bucket with local cache synchronization. Provides distributed locking via S3 conditional writes and bidirectional sync between a local cache directory and S3.

Authentication

Uses the default AWS credential chain — no credentials in config. Provide credentials via one of:

  • Environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
  • AWS profile: ~/.aws/credentials
  • IAM role attached to the instance or task

Required IAM Permissions

  • s3:HeadBucket
  • s3:GetObject
  • s3:PutObject
  • s3:DeleteObject
  • s3:ListBucket
  • s3:HeadObject

Usage

swamp datastore setup @swamp/s3-datastore \
  --config '{"bucket": "my-bucket", "prefix": "swamp", "region": "us-east-1"}' --json

S3-Compatible Endpoints

Supports S3-compatible services (MinIO, DigitalOcean Spaces, etc.) via the endpoint and forcePathStyle config options.

Repository

https://github.com/systeminit/swamp-extensions

Labels

datastoreawss3storage

Contents

Quality score

Verified by Swamp

How well-documented and verifiable this extension is.

91%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types0/1missing
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @swamp/s3-datastore

Amazon S3configurable
@swamp/s3-datastores3.ts

Store data in an Amazon S3 bucket with local cache synchronization.

Config Fields

FieldTypeDescription
bucketstringS3 bucket name
prefix?stringKey prefix within the bucket
region?stringAWS region (defaults to environment/credentials)
endpoint?stringCustom S3-compatible endpoint URL (e.g., https://nyc3.digitaloceanspaces.com)
forcePathStyle?booleanUse path-style addressing (bucket in path, not subdomain). Default: false