Skip to content

Buckets

Create buckets in the portal under Storage → Buckets, or with any S3 client once you have an access key.

Pick the region when you create the bucket. It cannot be changed later.

Public read access

A bucket can be switched to public in the portal. Public means anonymous GET and HEAD on objects: anyone with the URL can download them, with no key and no signature.

https://storage.itsh.dev/<bucket>/<key>

Listing is never public, even on a public bucket, so a caller cannot enumerate what is in it. They still need to know or guess the object key.

Public overrides access levels

Public read access applies to everyone, so it also applies to keys you deliberately restricted. A write-only key on a public bucket can still read its objects by simply not authenticating. Do not rely on an access level to withhold reads on a bucket that is public.

Switching a bucket back to private takes effect within 5 minutes.

CORS

Browsers need a CORS configuration before JavaScript can read from a bucket cross-origin. Set it with any S3 client using a key that has the Full access level:

bash
aws --endpoint-url https://storage.itsh.dev s3api put-bucket-cors \
  --bucket my-bucket \
  --cors-configuration '{
    "CORSRules": [{
      "AllowedOrigins": ["https://app.example.com"],
      "AllowedMethods": ["GET", "HEAD", "PUT"],
      "AllowedHeaders": ["*"],
      "ExposeHeaders": ["ETag"],
      "MaxAgeSeconds": 3600
    }]
  }'

CORS changes apply within 5 minutes.

Origins are matched exactly

https://app.example.com does not match https://www.app.example.com or a different port. List every origin you need, or use *.

Some browser APIs send Origin: null rather than the page origin, notably code running in a worker or a sandboxed frame. If downloads fail in the browser while uploads work, add "null" to AllowedOrigins.

Deleting a bucket

Deleting a bucket destroys its objects and cannot be undone. The name is released immediately and any customer can then claim it.

If a key was scoped to only that bucket, deleting it leaves the key with nothing to reach, so the key is deactivated rather than being left to silently fail. The portal lists any keys this affects before you confirm.

Next