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
- Navigate to Storage → Object Storage → Create Bucket.
- Choose a region.
- Set Access Control: Private (default) or Public.
- Click Create.
Step 2 — Generate Access Keys
- Go to Storage → Object Storage → Access Keys → Generate Key.
- 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: jsonSet the endpoint:
>_BASH
$export AWS_ENDPOINT_URL=https://storage.lightyear.hostStep 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
| Metric | Cost |
|---|---|
| Storage | $0.02/GB/month |
| Egress | $0.01/GB (first 1 TB free) |
| API requests | $0.004 per 10,000 |
