Guides

Store files in object storage

Object storage is S3-compatible, so the tools and SDKs you already use work with it. You create buckets and access keys with the Sandscale API, then talk S3.

Object storage comes with Pro (50 GB) and Team (500 GB), and Enterprise by agreement. Storage above your allowance is metered. It is available in the United States now; Europe is coming soon.

Every action is a POST to /api/v1/svc/objects/<Action> with a JSON body. Each is in the Object storage API reference.

OBJ=https://api.sandscale.dev/api/v1/svc/objects
AUTH="Authorization: Bearer $SANDSCALE_API_KEY"

1. Create a bucket

curl -X POST "$OBJ/CreateBucket" -H "$AUTH" -H "Content-Type: application/json" -d '{"Name": "build-artifacts"}'

Optional settings include versioning, object lock with a default retention, and tags. ListBuckets and DescribeBucket show your buckets and their usage.

2. Find your S3 endpoint

curl -X POST "$OBJ/DescribeObjectsService" -H "$AUTH" -H "Content-Type: application/json" -d '{}'

The answer has the region’s S3 Endpoint, the SigningRegion to sign requests with, and the service’s health.

3. Create an access key

S3 tools sign requests with an access key, not your API key. Create one in the console, or with CreateAccessKey from your own signed-in session: an API key cannot create one, and Sandscale asks you to confirm it is you. The secret is shown once.

A key can be limited to some buckets, key prefixes and network addresses, and expires within 365 days (365 by default). You can hold two keys at a time, so you can rotate one with overlap. A key never grants more than you hold yourself.

4. Use S3 tools

export AWS_ACCESS_KEY_ID=NIOS...  AWS_SECRET_ACCESS_KEY=...
aws s3 cp ./dist s3://build-artifacts/release/ --recursive \
  --endpoint-url "$ENDPOINT" --region "$SIGNING_REGION"

Use path-style addressing ($ENDPOINT/bucket/key). Any S3 SDK works the same way: set its endpoint and region to the values from step 2.

Turn a key off

UpdateAccessKey with "Status": "Inactive" stops a key at once, and DeleteAccessKey removes it. Every change to buckets, policies and keys is in your audit log.