Getting started with object storage: buckets, keys and S3 tools
Create a bucket, upload files in the browser, share a link, then connect the AWS CLI and Python with an access key.
Object storage keeps files of any size behind a simple web API. ByteNests object storage speaks the S3 protocol, so the tools and libraries written for Amazon S3 work with it unchanged. This tutorial covers everything from the first bucket to code that reads and writes files.
Buckets and objects in one minute
A bucket is a named container. An object is a file in it, with a key such as photos/2026/beach.jpg. There are no real folders: the slashes in the key are shown as folders for convenience. You pay for what you store, what is downloaded, and the number of requests. Uploads are free.
Step 1: create a bucket
Open Object Storage and choose Create bucket.
Name it, for example acme-media. Use 3 to 63 lowercase letters, numbers and hyphens. Bucket names are shared by every ByteNests customer and cannot be changed, so prefixing them with your company name avoids clashes.
Choose access. Private is the right default: files can only be read with a key or a share link. Public read lets anyone with a file’s URL download it.
Optionally turn on versioning, set a size limit, or delete files automatically after a number of days.
bn s3 bucket create acme-media
Step 2: upload and share in the browser
Open the bucket and drag files in. Files over 100 MB are uploaded in parts automatically. You can create folders, download and delete files, and edit a file’s content type and Cache-Control header.
To send one file to someone without making the bucket public, choose Share link. The link expires after 1 hour, 24 hours or 7 days.
Step 3: create an access key
Open Object Storage → Access keys and choose Create access key.
Name it after what will use it, for example laptop.
Choose permissions. For a single app, pick chosen buckets and give it read and write on its own bucket only.
Optionally add an expiry date and the IP addresses it may be used from.
Copy the access key ID and secret, or download them as CSV. The secret is shown only once.
bn s3 key create --name laptop --bucket acme-media=rw
bn s3 info
bn s3 info prints the endpoint and region your tools need. They are also on the Object Storage page.
Step 4: the AWS CLI
Store the key in a separate profile so it does not mix with any Amazon credentials, then pass the ByteNests endpoint with each command.
aws configure --profile bytenests
# enter the access key ID, the secret and the region from the Object Storage page
aws s3 ls s3://acme-media --profile bytenests --endpoint-url <endpoint>
aws s3 cp ./report.pdf s3://acme-media/docs/ --profile bytenests --endpoint-url <endpoint>
aws s3 sync ./site s3://acme-media/site --profile bytenests --endpoint-url <endpoint>
Step 5: from code
Any S3 SDK works: set the endpoint, region and key, and use it as you would with S3. In Python with boto3:
import boto3
s3 = boto3.client(
"s3",
endpoint_url="<endpoint>",
region_name="<region>",
aws_access_key_id="<ACCESS_KEY_ID>",
aws_secret_access_key="<SECRET_ACCESS_KEY>",
)
s3.upload_file("report.pdf", "acme-media", "docs/report.pdf")
for obj in s3.list_objects_v2(Bucket="acme-media", Prefix="docs/").get("Contents", []):
print(obj["Key"], obj["Size"])
Read the key from environment variables rather than writing it into your code.
Watch the bill
Usage on the Object Storage page shows storage, downloads and requests per day and per bucket. Downloads from a public bucket count as your egress, so if a public file suddenly becomes popular, you will see it there first. A size limit on the bucket sends an email at 80% and 95%.