Skip to content

Commit 1b6cc3f

Browse files
authored
docs(s3): add Clever Cloud Cellar in supported services
1 parent acf36d9 commit 1b6cc3f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/api/s3.md

+30
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,36 @@ const r2 = new S3Client({
327327
});
328328
```
329329

330+
### Using Bun's S3Client with Clever Cloud Cellar
331+
332+
To use Bun's S3 client with [Clever Cloud Cellar]([https://developers.cloudflare.com/r2/](https://www.clever-cloud.com/developers/doc/addons/cellar/)), set `endpoint` to the Cellar endpoint in the `S3Client` constructor.
333+
334+
```ts
335+
import { S3Client } from "bun";
336+
337+
// Clever Cloud Cellar
338+
const r2 = new S3Client({
339+
accessKeyId: "access-key",
340+
secretAccessKey: "secret-key",
341+
bucket: "my-bucket",
342+
endpoint: "https://cellar-c2.services.clever-cloud.com",
343+
});
344+
```
345+
346+
If you've linked a Cellar add-on to a Clever Cloud application, you can just use environment variables:
347+
348+
```ts
349+
import { S3Client } from "bun";
350+
351+
// Clever Cloud Cellar
352+
const r2 = new S3Client({
353+
accessKeyId: process.env.CELLAR_ADDON_KEY_ID,
354+
secretAccessKey: process.env.CELLAR_ADDON_KEY_SECRET,
355+
bucket: "my-bucket",
356+
endpoint: `https://${process.env.CELLAR_ADDON_HOST}`,
357+
});
358+
```
359+
330360
### Using Bun's S3Client with DigitalOcean Spaces
331361

332362
To use Bun's S3 client with [DigitalOcean Spaces](https://www.digitalocean.com/products/spaces/), set `endpoint` to the DigitalOcean Spaces endpoint in the `S3Client` constructor.

0 commit comments

Comments
 (0)