Skip to content
s3nd
Menu

Storage provider

s3nd with Scaleway Object Storage

European regions, S3-compatible, and the region actually means something.

createBucket()
import { createBucket } from 's3nd'

const store = createBucket({
  bucket: 'transfers',
  region: 'fr-par',
  endpoint: 'https://s3.fr-par.scw.cloud',
  credentials: {
    accessKeyId: process.env.SCW_ACCESS_KEY!,
    secretAccessKey: process.env.SCW_SECRET_KEY!,
  },
})

Why this one

Scaleway Object Storage

Scaleway's Object Storage is S3-compatible with one difference worth knowing: it uses the region. Pass fr-par, nl-ams or pl-waw explicitly rather than letting the endpoint default it to "auto".

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.

s3nd init --provider scaleway --bucket transfers
s3nd.config.json
{
  "bucket": "transfers",
  "region": "fr-par",
  "endpoint": "https://s3.fr-par.scw.cloud",
  "prefix": "transfers",
  "expiresIn": "24h",
  "envFile": ".env",
  "credentials": {
    "accessKeyId": "${SCW_ACCESS_KEY}",
    "secretAccessKey": "${SCW_SECRET_KEY}"
  }
}

Then

  1. 01Put SCW_ACCESS_KEY and SCW_SECRET_KEY in .env.
  2. 02Add a lifecycle rule on the transfers/ prefix.
  3. 03Run s3nd doctor. It performs the operations s3nd needs and reports what happened.

Worth knowing

Notes on Scaleway.

The region is real

The endpoint carries the region and the signature has to agree with it. Write both, in the same region.

Expiry cleanup

expiresIn stops a transfer being handed over; only a lifecycle rule deletes the object. Give the prefix a rule that expires objects after a day or two, and s3nd doctor turns green.

Put a file. Hand over the code.

Point it at the bucket you already pay for. Nothing to deploy, nothing to sign up for, nothing in the middle.

npm install -g @s3nd/clis3nd init --provider r2 --bucket drops3nd put ./anything.zip