Connect your S3 tools
Point the AWS CLI, rclone, Python boto3 or any S3 SDK at an Infraista bucket using its regional endpoint, path-style addressing and your access key.
Any tool that speaks S3 works with Object Storage. You need three things:
- The endpoint of the bucket's region. Copy it from the bucket's Overview under Bucket address, or from S3 endpoints on the Object Storage page.
- An access key: the access key ID and secret. See Create access keys.
- Path-style addressing: use the endpoint plus the bucket name in the path, as the console's Bucket URL shows.
When a tool asks for a region, use the bucket's region code (for example eu-central).
In the examples below, replace <endpoint> with your bucket's endpoint and my-bucket with its name.
AWS CLI
Save the key once as a profile:
aws configure --profile infraista
# AWS Access Key ID: <access key ID>
# AWS Secret Access Key: <secret>
# Default region name: eu-centralThen add --endpoint-url to every command:
aws s3 ls s3://my-bucket --profile infraista --endpoint-url <endpoint>
aws s3 cp ./render.exr s3://my-bucket/ --profile infraista --endpoint-url <endpoint>
aws s3 sync ./site s3://my-bucket/site --profile infraista --endpoint-url <endpoint>rclone
Add a remote to ~/.config/rclone/rclone.conf:
[infraista]
type = s3
provider = Other
access_key_id = <access key ID>
secret_access_key = <secret>
endpoint = <endpoint>
region = eu-central
acl = privateThen:
rclone ls infraista:my-bucket
rclone sync ./exports infraista:my-bucket/exportsPython (boto3)
import boto3
s3 = boto3.client(
"s3",
endpoint_url="<endpoint>",
aws_access_key_id="<access key ID>",
aws_secret_access_key="<secret>",
)
for obj in s3.list_objects_v2(Bucket="my-bucket").get("Contents", []):
print(obj["Key"])Other S3 SDKs work the same way: set the endpoint and your key, and turn on path-style addressing where
the SDK asks (for example forcePathStyle: true in the AWS SDK for JavaScript).
If something goes wrong
InvalidAccessKeyIdorSignatureDoesNotMatch: the key or secret is wrong, or the key was revoked. Create a new key.AccessDenied: the key can't reach this bucket, or is read-only and you tried to write. Check the key's scope on the Access keys page, or the bucket's Keys with access to this bucket list on its Permissions tab.- The bucket isn't found: check you used the endpoint of the bucket's own region.
Related
Create access keys
Create S3 access keys for Object Storage, limit each key to the buckets it needs with read-only or read-write permission, and revoke keys you no longer use.
Browse and share files
Upload, download, preview and delete files in a bucket from the console, restore older versions, and share a file with a temporary link.