Skip to content

Object storage

S3-compatible buckets for files, backups and static assets. Works with any S3 client or SDK.

Create a bucket and a key

Object Storage → Create bucket, then Create access key. The secret is shown once.

The bucket's real name is not the name you type. Bucket names are shared by everyone on the endpoint, so each tenant's buckets carry that tenant's prefix: typing assets creates t3fa9c1d2-assets (your prefix differs; the page shows it). S3 clients only know the full name. The short one is a display name in the console.

Buckets are created and deleted in the console, with the API or with Terraform. An access key works with the objects inside them: it cannot create or delete a bucket or change bucket settings, so aws s3 mb answers AccessDenied.

Connect

Setting Value
Endpoint https://s3.rso.dev
Region bg-central-1
Addressing path-style (https://s3.rso.dev/<bucket>/<key>)
Bucket the full name, for example t3fa9c1d2-assets

The region says where your data is stored. The endpoint has a single region and does not check the one a client signs with, so a tool that only accepts AWS region names works with us-east-1 as well.

export AWS_ACCESS_KEY_ID=<access key id>
export AWS_SECRET_ACCESS_KEY=<secret access key>
export AWS_DEFAULT_REGION=bg-central-1
aws configure set default.s3.addressing_style path
aws --endpoint-url https://s3.rso.dev s3 cp ./file.txt s3://t3fa9c1d2-assets/file.txt
aws --endpoint-url https://s3.rso.dev s3 ls s3://t3fa9c1d2-assets/
import boto3
from botocore.config import Config

s3 = boto3.client(
    "s3",
    endpoint_url="https://s3.rso.dev",
    region_name="bg-central-1",
    aws_access_key_id="<access key id>",
    aws_secret_access_key="<secret access key>",
    config=Config(s3={"addressing_style": "path"}),
)
s3.put_object(Bucket="t3fa9c1d2-assets", Key="file.txt", Body=b"hello")

An access key can read and write the objects in every bucket of its tenant and nothing else. That holds even when its owner's access in the console is limited to some buckets. Objects, listings, multipart uploads, tagging and presigned URLs are supported.

Notifications

A bucket can put a message in a queue or topic whenever an object is created or removed: see Bucket notifications.

Limits and metering

Buckets count against the buckets quota (default 10). A bucket must be empty to be deleted. Metered on GB-hours held, measured hourly.

Not available yet: public (anonymous) buckets, versioning, lifecycle rules, per-bucket keys, per-bucket size limits.

Terraform

# An S3-compatible bucket and an access key for it.
resource "rso_bucket" "assets" {
  name = "tf-example-assets"
}

resource "rso_bucket_key" "ci" {
  name = "tf-example-ci"
}

# Point any S3 client at these, with path-style addressing. `bucket` is the
# real name on the endpoint (the name above with your tenant's prefix):
#   AWS_DEFAULT_REGION=<region> aws --endpoint-url <endpoint> s3 ls s3://<bucket>/
output "bucket" {
  value = rso_bucket.assets.bucket
}

output "region" {
  value = rso_bucket.assets.region
}

output "endpoint" {
  value = rso_bucket.assets.endpoint
}

output "access_key_id" {
  value = rso_bucket_key.ci.access_key_id
}

output "secret_access_key" {
  value     = rso_bucket_key.ci.secret_access_key
  sensitive = true
}