# colis with Scaleway Object Storage

> Deliver files to your clients from a Scaleway Object Storage bucket with colis: the createBucket() configuration, the CLI starter, and what to know about this provider.

Canonical: https://colis-site.vercel.app/en/providers/scaleway · Markdown: https://colis-site.vercel.app/en/providers/scaleway.md · Français: https://colis-site.vercel.app/providers/scaleway

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

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

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’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".

## 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.

```sh
colis init --provider scaleway --bucket transfers
```
**colis.config.json**
```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. Put SCW_ACCESS_KEY and SCW_SECRET_KEY in .env.
2. Add a lifecycle rule on the prefix.
3. Run `colis verifier`. It performs the operations colis needs and reports what happened.

## 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.
- **Large files** — Large files go from the browser straight to the bucket, in parts. The bucket needs a CORS rule that allows PUT from your delivery page and exposes ETag; without it, small files still work.
- **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.

[The full guide](https://colis-docs.vercel.app/docs/stockages)
