Skip to content
colis

Storage provider

colis with Wasabi

S3-compatible, on a regional endpoint.

createBucket()
import { createBucket } from '@colis/core'

const store = createBucket({
  bucket: 'transfers',
  region: 'eu-central-1',
  endpoint: 'https://s3.eu-central-1.wasabisys.com',
  credentials: {
    accessKeyId: process.env.WASABI_ACCESS_KEY!,
    secretAccessKey: process.env.WASABI_SECRET_KEY!,
  },
})

Why this one

Wasabi

Wasabi is S3-compatible and reached through a regional endpoint. It works with colis like any other endpoint-based provider: set the endpoint and the region, and hand it a key pair.

From the command line

A starter configuration, and what is left to do.

init writes the file with ${VAR} references rather than secrets, so it is meant to be committed; the env file it points at is not.

colis.config.json
{
  "bucket": "transfers",
  "region": "eu-central-1",
  "endpoint": "https://s3.eu-central-1.wasabisys.com",
  "prefix": "transfers",
  "expiresIn": "24h",
  "envFile": ".env",
  "credentials": {
    "accessKeyId": "${WASABI_ACCESS_KEY}",
    "secretAccessKey": "${WASABI_SECRET_KEY}"
  }
}

Then

  1. 01Put WASABI_ACCESS_KEY and WASABI_SECRET_KEY in .env.
  2. 02Add a lifecycle rule on the prefix.
  3. 03Run colis verifier. It performs the operations colis needs and reports what happened.

Worth knowing

Notes on Wasabi.

Read the storage terms

How long a deleted object is still billed depends on the provider’s terms. Parcels are short-lived by design, so check them before you rely on short lifetimes.

Expiry cleanup

The expiry stops a parcel being handed over; only a lifecycle rule deletes the object. Give the prefix a rule that expires objects after a day or two, and colis verifier turns green.

Send it. They sign off. You know.

Your storage, a delivery page under your name, a webhook at every step. Nothing hosted by someone else.