Adapter
Wasabi
Overview
Wasabi Hot Cloud Storage is S3-compatible. This adapter is a thin wrapper over @storagesdk/adapters/s3 with Wasabi defaults baked in — the endpoint is built from your region, and the rest of the surface is identical to the S3 adapter.
Configuration
import { Storage } from '@storagesdk/core';
import { wasabi } from '@storagesdk/adapters/wasabi';
const storage = new Storage({
adapter: wasabi({
bucket: 'photos',
region: 'us-east-1',
accessKeyId: process.env.WASABI_ACCESS_KEY_ID!,
secretAccessKey: process.env.WASABI_SECRET_ACCESS_KEY!,
}),
});
wasabi({
bucket: string; // bucket the adapter operates on (must already exist)
region: string; // e.g. 'us-east-1', 'eu-central-1', 'ap-northeast-1'
accessKeyId: string; // Wasabi access key
secretAccessKey: string; // Wasabi secret
endpoint?: string; // override; defaults to `https://s3.<region>.wasabisys.com`
});
Create access keys in the Wasabi console → Access Keys. The secret is shown only once.
Notes
- Snapshots and forks are emulated as sibling buckets via
CopyObject(S3-standard). storage.rawis the underlying@aws-sdk/client-s3S3Clientfor any S3 operation the adapter doesn’t surface.