Use an AWS SDK

Point the AWS SDK for Python or JavaScript at the S3 endpoint and upload and download objects.

Last updated 18 November 2026View as Markdown

The AWS SDKs work with the endpoint, including their default chunk-signed and checksummed uploads. Replace EWS1EXAMPLEEXAMPLE00 and <secret> with your access key, example-uploads with your bucket's name and https://s3.<domain> with the endpoint. The bucket's Overview shows the same snippets under Connect.

Prerequisites

Python (boto3)

import boto3
from botocore.config import Config

s3 = boto3.client(
    "s3",
    endpoint_url="https://s3.<domain>",
    aws_access_key_id="EWS1EXAMPLEEXAMPLE00",
    aws_secret_access_key="<secret>",
    region_name="de1",
    config=Config(s3={"addressing_style": "virtual"}),
)

s3.upload_file("report.pdf", "example-uploads", "report.pdf")
s3.download_file("example-uploads", "report.pdf", "copy.pdf")

JavaScript (@aws-sdk/client-s3)

import { GetObjectCommand, PutObjectCommand, S3Client } from '@aws-sdk/client-s3';

const s3 = new S3Client({
  endpoint: 'https://s3.<domain>',
  region: 'de1',
  credentials: { accessKeyId: 'EWS1EXAMPLEEXAMPLE00', secretAccessKey: '<secret>' },
});

await s3.send(new PutObjectCommand({ Bucket: 'example-uploads', Key: 'hello.txt', Body: 'hello' }));
const res = await s3.send(new GetObjectCommand({ Bucket: 'example-uploads', Key: 'hello.txt' }));

Path-style addressing (forcePathStyle: true, https://s3.<domain>/example-uploads/<key>) works as well as virtual-hosted (https://example-uploads.s3.<domain>/<key>).

Result

The SDK reads and writes the bucket as the key's IAM user. For temporary credentials, also set the session token (see Create temporary credentials).

Did this page help you?