Object storage for files and uploads.

S3-compatible storage for a project: how to add a bucket, the S3_* variables your application gets, and how storage and operations are priced.

2 MIN READ

Object storage keeps files outside your application: user uploads, generated reports, media, your own backups. It works with any library or tool that speaks the S3 protocol — the AWS SDKs, Laravel's s3 disk, django-storages, boto3, rclone and many more.

Adding storage

The application's Overview → Services → Object storage → Add storage. Give the bucket a name — small Latin letters, digits and dashes, starting with a letter — and confirm. The bucket is ready in a moment.

A project can have up to 3 buckets.

The variables your application gets

The access details are added to the project's variables by themselves; the application picks them up with its next deploy:

VariableWhat it is
S3_ENDPOINTthe address of the storage
S3_REGIONthe region to use in your S3 client
S3_BUCKETthe bucket name
S3_KEYthe access key
S3_SECRETthe secret key

The key works for this bucket only. A second bucket of the project gets its variables with its name in front: <NAME>_S3_ENDPOINT, <NAME>_S3_BUCKET and so on.

A variable of your own with the same name stays in place — useful if part of your application should keep using storage elsewhere. See Environment variables.

Example: Laravel

In config/filesystems.php, point the s3 disk at the variables:

's3' => [
    'driver' => 's3',
    'key' => env('S3_KEY'),
    'secret' => env('S3_SECRET'),
    'region' => env('S3_REGION'),
    'bucket' => env('S3_BUCKET'),
    'endpoint' => env('S3_ENDPOINT'),
    'use_path_style_endpoint' => true,
],

Then set FILESYSTEM_DISK=s3 on the Variables tab.

Example: Node.js

import { S3Client } from '@aws-sdk/client-s3'
 
const s3 = new S3Client({
  endpoint: process.env.S3_ENDPOINT,
  region: process.env.S3_REGION,
  credentials: { accessKeyId: process.env.S3_KEY, secretAccessKey: process.env.S3_SECRET },
})

Price

Price
Storage$0.025 per GB a month
Trafficfree — downloads from the storage cost nothing
Writes$6 per million operations
Reads$0.50 per million operations

Storage is measured every day and averaged over the month, so a file kept for half a month costs half. Usage of a calendar month is added to the project's next payment as one line; there is no separate subscription.

Deleting a bucket

Deletion of the bucket removes every file in it; they cannot be restored, and its variables leave the project. Deleting a bucket is available to the account owner and the application's Administrators.

Still stuck?

Chat with a real engineer — median response under 3 minutes, any time of day.

Contact support