LightYear
/Docs
DocsStorageGetting Started with Object Storage

Getting Started with Object Storage

Create an object storage bucket, upload files, and access them via the S3-compatible API.

beginner
7 min read
LightYear Team
Updated April 24, 2026
object-storages3bucketfiles

Overview

LightYear Object Storage is an S3-compatible service for storing unstructured data — images, backups, datasets, logs, and static assets.

Step 1 — Create a Bucket

  1. Navigate to Storage → Object Storage → Create Bucket.
  2. Choose a region.
  3. Set Access Control: Private (default) or Public.
  4. Click Create.

Step 2 — Generate Access Keys

  1. Go to Storage → Object Storage → Access Keys → Generate Key.
  2. Save the Access Key ID and Secret Access Key securely.

Step 3 — Configure the AWS CLI

>_BASH
$pip3 install awscli
$aws configure
$# AWS Access Key ID: <your-access-key>
$# AWS Secret Access Key: <your-secret-key>
$# Default region name: ap-east-1
$# Default output format: json

Set the endpoint:

>_BASH
$export AWS_ENDPOINT_URL=https://storage.lightyear.host

Step 4 — Upload Files

>_BASH
$# Upload a single file
$aws s3 cp dataset.tar.gz s3://my-bucket/datasets/
$
$# Upload a directory
$aws s3 sync ./models/ s3://my-bucket/models/
$
$# List bucket contents
$aws s3 ls s3://my-bucket/

Step 5 — Access Files Programmatically

PYTHON
import boto3

s3 = boto3.client(
    "s3",
    endpoint_url="https://storage.lightyear.host",
    aws_access_key_id="<ACCESS_KEY>",
    aws_secret_access_key="<SECRET_KEY>",
)

# Upload
s3.upload_file("local_file.txt", "my-bucket", "remote_file.txt")

# Download
s3.download_file("my-bucket", "remote_file.txt", "local_copy.txt")

# Generate presigned URL (expires in 1 hour)
url = s3.generate_presigned_url(
    "get_object",
    Params={"Bucket": "my-bucket", "Key": "remote_file.txt"},
    ExpiresIn=3600,
)

Pricing

MetricCost
Storage$0.02/GB/month
Egress$0.01/GB (first 1 TB free)
API requests$0.004 per 10,000

Was this article helpful?

Your cookie choices for this website

This site uses cookies and related technologies, as described in our privacy policy, for purposes that may include site operation, analytics, and enhanced user experience. You may choose to consent to our use of these technologies, or manage your own preferences. Cookie policy