Docs · Storage
UpdatedS3 clients: AWS CLI, boto3, Go, Node.js, Rust and rclone
Subnomic Storage speaks the S3 API, so the tools you already use work once they know four settings. This page has them, and a working setup for the AWS CLI, Python, Go, Node.js, Rust and rclone.
The four settings
Every S3 client asks for the same four things. These are the values for Subnomic Storage:
| Setting | Value |
|---|---|
| Endpoint | https://objects.subnomic.com |
| Region setting | eu-west-1 — the value requests are signed with; any other is refused |
| Addressing | Path-style: the bucket goes in the path, objects.subnomic.com/<bucket>/<key>, not in the hostname |
| Credentials | An access key id and secret from Storage → Access keys |
Requests are signed with AWS Signature Version 4, which every current client uses by default. The access-key dialog in the console shows the endpoint too; the secret is shown once, so copy it before you close the dialog.
The same three settings in each SDK on this page:
| Client | Endpoint | Region | Path-style |
|---|---|---|---|
| boto3 | endpoint_url= | region_name= | Config(s3={"addressing_style": "path"}) |
| Go v2 | o.BaseEndpoint | config.WithRegion | o.UsePathStyle = true |
| JavaScript v3 | endpoint: | region: | forcePathStyle: true |
| Rust | .endpoint_url() | .region() | .force_path_style(true) |
| rclone | endpoint = | region = | its default for provider = Other |
eu-west-1, and a client left on the SDK default of us-east-1 is refused with AuthorizationHeaderMalformed. If a client that works against AWS fails here on the first call, check the region first.AWS CLI
Keep the key in a profile of its own, so it never mixes with your AWS credentials:
aws configure set aws_access_key_id <access key id> --profile subnomic aws configure set aws_secret_access_key <secret> --profile subnomic aws configure set region eu-west-1 --profile subnomic
Then pass the profile and the endpoint with each command:
aws --profile subnomic --endpoint-url https://objects.subnomic.com s3 ls aws --profile subnomic --endpoint-url https://objects.subnomic.com s3 cp ./backup.tar.gz s3://acme-backups/2026/10/backup.tar.gz aws --profile subnomic --endpoint-url https://objects.subnomic.com s3 sync ./dist s3://acme-assets/dist
In CI, environment variables do the same job. This is the shape of the step that publishes Subnomic’s own release binaries:
- name: Upload to Subnomic Storage env: AWS_ACCESS_KEY_ID: ${{ secrets.SUBNOMIC_OBJECTS_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.SUBNOMIC_OBJECTS_SECRET_KEY }} AWS_REGION: eu-west-1 run: aws --endpoint-url https://objects.subnomic.com s3 sync ./dist/ s3://acme-releases/${{ github.ref_name }}/
Python (boto3)
Give the client the endpoint and the region, and ask for path-style addressing explicitly:
import os import boto3 from botocore.config import Config s3 = boto3.client( "s3", endpoint_url="https://objects.subnomic.com", region_name="eu-west-1", aws_access_key_id=os.environ["SUBNOMIC_ACCESS_KEY_ID"], aws_secret_access_key=os.environ["SUBNOMIC_SECRET_ACCESS_KEY"], config=Config(s3={"addressing_style": "path"}), ) s3.upload_file("backup.tar.gz", "acme-backups", "2026/10/backup.tar.gz") for obj in s3.list_objects_v2(Bucket="acme-backups", Prefix="2026/").get("Contents", []): print(obj["Key"], obj["Size"])
upload_file switches to a multipart upload on its own for a large file, and multipart uploads are supported.
With the profile from the AWS CLI
If you created the subnomic profile above, a session reads the key and the region from it. The endpoint and the addressing style still go on the client:
session = boto3.Session(profile_name="subnomic") s3 = session.client( "s3", endpoint_url="https://objects.subnomic.com", config=Config(s3={"addressing_style": "path"}), )
There is no sync in boto3
aws s3 sync is a feature of the AWS CLI, not of the SDK; boto3 has no equivalent. To upload a whole folder from Python, walk it:
from pathlib import Path root = Path("dist") for path in root.rglob("*"): if path.is_file(): key = "dist/" + path.relative_to(root).as_posix() s3.upload_file(str(path), "acme-assets", key)
This uploads every file every time. To send only what changed, and to delete what is gone, call aws s3 sync or rclone sync instead.
A link that expires
A presigned URL lets somebody without a key fetch one object until it expires, and nothing needs to change on the bucket to allow it:
url = s3.generate_presigned_url( "get_object", Params={"Bucket": "acme-backups", "Key": "2026/10/backup.tar.gz"}, ExpiresIn=3600, # seconds; at most 7 days )
Seven days is the ceiling, as it is on AWS. For a link you can revoke before it expires, use the share link in the console’s browser view instead — see Sharing a single file.
Go (AWS SDK for Go v2)
Load the config with the region, then set the endpoint and path-style on the S3 client:
go get github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/service/s3
package main import ( "context" "fmt" "log" "os" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/s3" ) func main() { ctx := context.Background() cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion("eu-west-1"), config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider( os.Getenv("SUBNOMIC_ACCESS_KEY_ID"), os.Getenv("SUBNOMIC_SECRET_ACCESS_KEY"), "")), ) if err != nil { log.Fatal(err) } client := s3.NewFromConfig(cfg, func(o *s3.Options) { o.BaseEndpoint = aws.String("https://objects.subnomic.com") o.UsePathStyle = true }) f, err := os.Open("backup.tar.gz") if err != nil { log.Fatal(err) } defer f.Close() if _, err := client.PutObject(ctx, &s3.PutObjectInput{ Bucket: aws.String("acme-backups"), Key: aws.String("2026/10/backup.tar.gz"), Body: f, }); err != nil { log.Fatal(err) } out, err := client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{ Bucket: aws.String("acme-backups"), Prefix: aws.String("2026/"), }) if err != nil { log.Fatal(err) } for _, obj := range out.Contents { fmt.Println(aws.ToString(obj.Key), aws.ToInt64(obj.Size)) } }
With the subnomic profile from the AWS CLI section, replace both options with config.WithSharedConfigProfile("subnomic"). A link that expires:
// also import "time" req, err := s3.NewPresignClient(client).PresignGetObject(ctx, &s3.GetObjectInput{ Bucket: aws.String("acme-backups"), Key: aws.String("2026/10/backup.tar.gz"), }, s3.WithPresignExpires(time.Hour)) // req.URL is https://objects.subnomic.com/acme-backups/2026/10/backup.tar.gz?X-Amz-…
Node.js (AWS SDK for JavaScript v3)
npm install @aws-sdk/client-s3 @aws-sdk/s3-request-presigner
import { readFile } from "node:fs/promises"; import { S3Client, PutObjectCommand, ListObjectsV2Command, GetObjectCommand } from "@aws-sdk/client-s3"; import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; const s3 = new S3Client({ endpoint: "https://objects.subnomic.com", region: "eu-west-1", forcePathStyle: true, credentials: { accessKeyId: process.env.SUBNOMIC_ACCESS_KEY_ID, secretAccessKey: process.env.SUBNOMIC_SECRET_ACCESS_KEY, }, }); await s3.send(new PutObjectCommand({ Bucket: "acme-assets", Key: "img/logo.png", Body: await readFile("logo.png"), ContentType: "image/png", })); const { Contents = [] } = await s3.send(new ListObjectsV2Command({ Bucket: "acme-assets", Prefix: "img/" })); for (const obj of Contents) console.log(obj.Key, obj.Size); const url = await getSignedUrl(s3, new GetObjectCommand({ Bucket: "acme-assets", Key: "img/logo.png" }), { expiresIn: 3600 });
PutObjectCommand sends a body it can measure: a buffer, a string, or a file read into memory. For a large file or a stream, use Upload from @aws-sdk/lib-storage, which splits it into a multipart upload:
import { createReadStream } from "node:fs"; import { Upload } from "@aws-sdk/lib-storage"; await new Upload({ client: s3, params: { Bucket: "acme-backups", Key: "2026/10/db.dump", Body: createReadStream("db.dump") }, }).done();
Rust (AWS SDK for Rust)
cargo add aws-config aws-sdk-s3 tokio --features tokio/full
use aws_config::BehaviorVersion; use aws_sdk_s3::{config::Region, primitives::ByteStream, Client}; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { // Reads AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, or a profile via AWS_PROFILE. let shared = aws_config::defaults(BehaviorVersion::latest()) .region(Region::new("eu-west-1")) .load() .await; let conf = aws_sdk_s3::config::Builder::from(&shared) .endpoint_url("https://objects.subnomic.com") .force_path_style(true) .build(); let client = Client::from_conf(conf); client .put_object() .bucket("acme-backups") .key("2026/10/backup.tar.gz") .body(ByteStream::from_path("backup.tar.gz").await?) .send() .await?; let out = client.list_objects_v2().bucket("acme-backups").prefix("2026/").send().await?; for obj in out.contents() { println!("{} {}", obj.key().unwrap_or_default(), obj.size().unwrap_or_default()); } Ok(()) }
A link that expires, with aws_sdk_s3::presigning::PresigningConfig:
let req = client .get_object() .bucket("acme-backups") .key("2026/10/backup.tar.gz") .presigned(PresigningConfig::expires_in(std::time::Duration::from_secs(3600))?) .await?; println!("{}", req.uri());
Checksums
Current SDKs add a CRC checksum to every upload by default and send the body as aws-chunked with the checksum in a trailer. Subnomic Storage reads all four streaming forms and their trailers, so there is nothing to turn off: the defaults work as they are.
rclone
Add a remote to rclone.conf (rclone config file prints where it is). provider = Other is rclone’s setting for an S3-compatible service; path-style is already rclone’s default for it.
[subnomic] type = s3 provider = Other access_key_id = <access key id> secret_access_key = <secret> endpoint = https://objects.subnomic.com region = eu-west-1
rclone lsd subnomic: rclone copy ./photos subnomic:acme-media/photos --progress rclone sync ./dist subnomic:acme-assets/dist
rclone sync deletes from the destination whatever is not in the source. Run it with --dry-run first when the destination already holds anything you care about.
Moving data in, and out
Because the API is S3, moving to or from Subnomic Storage needs no export tool: point one client at both ends. With rclone, add a second remote for the other provider and copy between them:
rclone copy otherprovider:old-bucket subnomic:acme-archive --progress
The same command, the other way round, is how you leave. Why we built it that way is in An object store you can leave.
When a request is refused
The endpoint answers a bad signature with the most specific S3 error code it can, so the code tells you where to look. Signatures are Signature Version 4 only.
| Error | Cause, and the fix |
|---|---|
AuthorizationHeaderMalformed … the region 'us-east-1' is wrong; expecting 'eu-west-1' | The client signed for another region. Set the region to eu-west-1. Most SDKs read the expected region from the response and retry on their own; the ones that do not fail here. Why the region matters at all is in The region is part of the signature. |
AuthorizationHeaderMalformed, no region in the message | The Authorization header is not a valid SigV4 one: a SigV2 client (AWS <key>:<signature>), a credential scope that is not s3, or a malformed date. Upgrade the client or switch it to SigV4. |
SignatureDoesNotMatch | The signature was computed with a different secret, or over a request that changed after signing. Check the secret for a stray space or newline from copying, and anything between the client and the endpoint that rewrites the Host header, the path or the body. |
InvalidAccessKeyId | The access key id is not one the endpoint accepts. Often the client picked up your AWS credentials from the environment instead of the Subnomic profile. |
RequestTimeTooSkewed | The machine’s clock is more than 15 minutes off. Fix its time sync (NTP); the signature includes the time. |
ExpiredToken | A presigned URL past its expiry. Presign again; a URL can live at most seven days. |
MissingSecurityHeader | The request carries no signature date or no x-amz-content-sha256. Every SigV4 client sends both; a hand-built request has to as well. |
Could not resolve acme-backups.objects.subnomic.com | The client put the bucket in the hostname (virtual-hosted style), and no such host exists. Turn on path-style addressing, as in each setup above. |
NotImplemented (501) | An S3 feature this endpoint refuses, such as ACLs or S3 Select. The full list is on the Storage page. |
What a key can reach
An access key belongs to the workspace, not to the person who created it, and it keeps working after they leave — revoke a leaver’s keys as part of offboarding. Keys can carry an expiry, and disabling one takes effect on the next request. Buckets, keys, sharing and limits are covered in Object storage.