S3 storage
Add an S3-compatible file bucket to your project.
npx extraorbital add s3Files are private unless you enable public access.
- 01 / Run the commandGet the service
- 02 / Read your .envUse its credentials
- 03 / Connect your appCall the SDK or API
Limits
| Limit | Free · Prototype | Paid |
|---|---|---|
| Storage | 1 GB | Usage billed |
| Requests | 10K simple + 2K advanced / mo | Usage billed |
| Bandwidth | 10 GB out / mo | $0.09 / GB out |
| Backups | None | Charged as storage |
| Inactive resource | 30 days after last use | Persistent |
Free allowances are shared across the account. Provider limits still apply on paid plans.
Use it
Any S3 client works:
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.
| Variable | Purpose |
|---|---|
S3_BUCKET | Bucket name |
S3_ENDPOINT | S3-compatible API endpoint |
S3_REGION | Bucket region |
S3_ACCESS_KEY_ID | Bucket access key |
S3_SECRET_ACCESS_KEY | Private signing secret |
Specifics
Options
npx extraorbital add s3 [--slug <name>] [--public] [--region <region>]| Flag | Default | Description |
|---|---|---|
--slug | default | A second, fully separate bucket in the same project |
--public | off | Objects are publicly readable at {endpoint}/{bucket}/{key} |
--region | us-east-1 | One 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
| Usage | Paid 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 ↗