S3 client examples¶
Replace YOUR-ENDPOINT, YOUR_ACCESS_KEY, and YOUR_SECRET_KEY with the values from
your welcome email. Use path-style addressing (the examples below already do).
AWS CLI¶
# Configure a named profile
aws configure set aws_access_key_id YOUR_ACCESS_KEY --profile zendrive
aws configure set aws_secret_access_key YOUR_SECRET_KEY --profile zendrive
aws configure set region us-east-1 --profile zendrive
# Use it (read-only: list and download)
aws --profile zendrive --endpoint-url "https://YOUR-ENDPOINT/" s3 ls
aws --profile zendrive --endpoint-url "https://YOUR-ENDPOINT/" s3 cp s3://my-bucket/file.txt ./
rclone¶
# ~/.config/rclone/rclone.conf
[zendrive]
type = s3
provider = Other
access_key_id = YOUR_ACCESS_KEY
secret_access_key = YOUR_SECRET_KEY
endpoint = https://YOUR-ENDPOINT/
force_path_style = true
rclone lsd zendrive:
rclone copy zendrive:my-bucket/ ./localdir
s3cmd¶
# ~/.s3cfg
access_key = YOUR_ACCESS_KEY
secret_key = YOUR_SECRET_KEY
host_base = YOUR-ENDPOINT
host_bucket = YOUR-ENDPOINT
use_https = True
s3cmd ls
s3cmd get s3://my-bucket/file.txt ./
Cyberduck¶
- New Bookmark → choose Amazon S3.
- Set Server to your endpoint hostname (no
https://). - Enter your access key as the username and secret key as the password.
- Under More Options → Connect Mode, prefer path-style if offered.
boto3 (Python)¶
import boto3
s3 = boto3.client(
"s3",
endpoint_url="https://YOUR-ENDPOINT/",
aws_access_key_id="YOUR_ACCESS_KEY",
aws_secret_access_key="YOUR_SECRET_KEY",
region_name="us-east-1",
)
print([b["Name"] for b in s3.list_buckets()["Buckets"]])
Force path-style in SDKs
If an SDK defaults to virtual-host addressing, enable path-style (e.g. boto3's
Config(s3={"addressing_style": "path"})). See addressing.
Does my favorite client work?¶
If it speaks the S3 API and lets you set a custom endpoint and keys, it should work. If you hit trouble, see client gotchas or email support@clearstreamer.com.