Skip to content
extraorbital
Documentation ExtraOrbital
Browse documentation

Data & storage

S3 storage

Add an S3-compatible file bucket to your project.

Run in your project folder
npx extraorbital add s3

Files are private unless you enable public access.

  1. 01 / Run the commandGet the service
  2. 02 / Read your .envUse its credentials
  3. 03 / Connect your appCall the SDK or API

Limits

LimitFree · PrototypePaid
Storage1 GBUsage billed
Requests10K simple + 2K advanced / moUsage billed
Bandwidth10 GB out / mo$0.09 / GB out
BackupsNoneCharged as storage
Inactive resource30 days after last usePersistent

Free allowances are shared across the account. Provider limits still apply on paid plans.

Use it

Any S3 client works:

storage.ts
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";

const s3 = new S3Client({
  endpoint: process.env.S3_ENDPOINT,
  region: process.env.S3_REGION,
  credentials: {
    accessKeyId: process.env.S3_ACCESS_KEY_ID!,
    secretAccessKey: process.env.S3_SECRET_ACCESS_KEY!,
  },
});

await s3.send(
  new PutObjectCommand({ Bucket: process.env.S3_BUCKET, Key: "report.json", Body: data }),
);

Environment variables

The CLI writes these to .env or an existing .env.local.

VariablePurpose
S3_BUCKETBucket name
S3_ENDPOINTS3-compatible API endpoint
S3_REGIONBucket region
S3_ACCESS_KEY_IDBucket access key
S3_SECRET_ACCESS_KEYPrivate signing secret

Specifics

Options

Terminal
npx extraorbital add s3 [--slug <name>] [--public] [--region <region>]
FlagDefaultDescription
--slugdefaultA second, fully separate bucket in the same project
--publicoffObjects are publicly readable at {endpoint}/{bucket}/{key}
--regionus-east-1One of us-east-1, eu-central-1, ap-southeast-1

Options apply only when creating a bucket. Reusing its slug does not change it. Use a new slug for a different configuration.

Access

Credentials are limited to this bucket. --public makes objects readable without authentication. Use a new slug for a different configuration; repeating add reuses the existing bucket.

Pricing

UsagePaid rate
Storage$0.023 / GB-mo
Requests$0.0004 / 1K simple, $0.005 / 1K advanced
Bandwidth$0.09 / GB out

See pricing for team subscription fees, allowances, and billing terms. Plans and billing ↗