Storage Architecture Diagram
LightYear Object Storage provides S3-compatible storage for files, backups, static assets, and media. It is accessible via the S3 API, making it compatible with any S3 SDK or tool.
Create an Object Storage Bucket
- Navigate to Storage → Object Storage.
- Click Create Bucket.
- Select a region.
- Enter a globally unique bucket name (e.g.,
myapp-assets-2026). - Choose Access Control: Private or Public.
- Click Create.
Generate Access Credentials
- Navigate to Account → API → Object Storage.
- Click Generate Credentials.
- Note the Access Key and Secret Key — the secret key is only shown once.
Configure the AWS CLI
$pip install awscli$aws configureAWS Access Key ID [None]: YOUR_ACCESS_KEY
AWS Secret Access Key [None]: YOUR_SECRET_KEY
Default region name [None]: sgp-01
Default output format [None]: jsonSet the endpoint URL for LightYear Object Storage:
$export AWS_ENDPOINT_URL=https://sgp-01.objectstorage.lightyear.hostBasic Operations
List Buckets
$aws s3 ls2026-04-24 10:00:00 myapp-assets-2026Upload a File
$aws s3 cp ./image.png s3://myapp-assets-2026/images/image.pngUpload a Directory
$aws s3 sync ./dist/ s3://myapp-assets-2026/static/ --deleteDownload a File
$aws s3 cp s3://myapp-assets-2026/images/image.png ./downloaded-image.pngGenerate a Pre-signed URL (Time-limited Access)
$aws s3 presign s3://myapp-assets-2026/images/image.png --expires-in 3600Use with Python (boto3)
import boto3
s3 = boto3.client(
's3',
endpoint_url='https://sgp-01.objectstorage.lightyear.host',
aws_access_key_id='YOUR_ACCESS_KEY',
aws_secret_access_key='YOUR_SECRET_KEY'
)
# Upload a file
s3.upload_file('local_file.txt', 'myapp-assets-2026', 'remote/path/file.txt')
# Generate a pre-signed URL
url = s3.generate_presigned_url(
'get_object',
Params={'Bucket': 'myapp-assets-2026', 'Key': 'remote/path/file.txt'},
ExpiresIn=3600
)
print(url)Enable CDN for a Bucket
- Navigate to Storage → Object Storage → Your Bucket.
- Click Enable CDN.
- Your bucket content is now served from edge locations globally.
CDN URLs follow the pattern: https://cdn.lightyear.host/BUCKET_NAME/path/to/file.png
[!TIP] Use CDN for static assets (images, CSS, JS) to reduce latency for global users. CDN bandwidth is charged separately at $0.005/GB.
