Back to HomeAlibaba Cloud

Alibaba Cloud OSS Complete Tutorial: Object Storage Setup, Pricing, and Use Cases [2025]

9 min min read
#Alibaba Cloud OSS#Object Storage#Object Storage#Bucket#Cloud Storage#AWS S3 Comparison#API Integration#CDN Integration#Storage Pricing#Alibaba Cloud

Alibaba Cloud OSS Complete Tutorial: Object Storage Setup, Pricing, and Use Cases [2025]

Website images are piling up and your server disk is almost full?

Don't know where to store database backup files?

Alibaba Cloud OSS might be the solution you need. Cheap, reliable, and unlimited capacity.

Illustration 1: OSS Storage Management Interface

What is Alibaba Cloud OSS?

OSS stands for Object Storage Service.

In English, it's called "object storage."

Simply put: it's a huge cloud drive specifically for storing files.

How is OSS Different from Regular Hard Drives?

ComparisonRegular Hard DriveOSS Object Storage
Capacity LimitFixed (buy what you use)Unlimited
Expansion MethodBuy new drivesAuto-scaling
Access MethodFile pathHTTP URL / API
PricingOne-time purchasePay for what you use
ReliabilitySingle point of failure riskMultiple backups (99.9999999999%)

Core Concepts of OSS

Bucket

Like a top-level folder.

All files must be placed in a Bucket.

Naming rules: 3-63 characters, only lowercase letters, numbers, and hyphens.

Object

This is a file.

Each Object has a unique Key (similar to a file path).

Example: images/product/item-001.jpg

Endpoint

The URL for accessing OSS.

Different regions have different Endpoints.

Example for Hong Kong: oss-cn-hongkong.aliyuncs.com

To learn about Alibaba Cloud's complete services, see Alibaba Cloud Complete Guide: From Beginner to Advanced, Essential Reading for International Users [2025].


OSS vs S3 vs GCS Comparison

Which of the three major cloud object storage services should you choose?

ComparisonAlibaba Cloud OSSAWS S3GCP Cloud Storage
Storage PriceFrom $0.02/GB/monthFrom $0.023/GB/monthFrom $0.02/GB/month
Request CostCheaperMediumMedium
Traffic CostFrom $0.076/GBFrom $0.09/GBFrom $0.12/GB
China RegionsMost completeLimitedNone
Global Regions2930+35+
Ecosystem IntegrationAlibaba Cloud servicesAWS servicesGCP services
API CompatibilityS3 compatibleNativeS3 compatible

Key Selection Advice

Choose OSS when:

  • Already using other Alibaba Cloud services
  • Main users are in China
  • Want to save on traffic costs

Choose S3 when:

  • Using AWS ecosystem
  • Need the most third-party integrations
  • Global deployment

Choose GCS when:

  • Using GCP ecosystem
  • Pairing with BigQuery for data analysis
  • Machine learning projects

Illustration 2: Three Major Cloud Object Storage Comparison

OSS, S3, GCS each have advantages—choice depends on your business scenario. Schedule a free consultation and let us help analyze the best storage solution for you.


OSS Use Cases

OSS isn't just for storing files—it has many uses.

Scenario 1: Website Static Resources

Put images, CSS, JavaScript on OSS.

Combined with CDN acceleration, website speed improves dramatically.

Benefits:

  • Reduce server load
  • Lower bandwidth costs
  • Improve loading speed

For CDN setup, see Alibaba Cloud CDN and DNS Tutorial: Acceleration Setup and DDoS Protection Guide.

Scenario 2: Data Backup

Database backups, system images, log files.

OSS's "Archive Storage" type costs only 1/10 of standard storage.

Benefits:

  • Automatic multiple backups
  • 99.9999999999% data durability
  • Extremely low cost

Scenario 3: Large File Distribution

Software installers, game updates, video assets.

Distribute through OSS + CDN—fast and stable.

Scenario 4: Data Lake

Store raw data in OSS, analyze with MaxCompute or EMR.

This is the standard architecture for Alibaba Cloud big data solutions. Combined with Alibaba Cloud AI Services, you can also do machine learning and intelligent analysis.

Scenario 5: App User Uploads

Let app users upload files directly to OSS.

Doesn't go through your server—saves bandwidth and money.


OSS Setup Tutorial

Hands-on practice once is more effective than reading documentation.

Step 1: Create a Bucket

  1. Log into Alibaba Cloud console
  2. Find "Object Storage OSS"
  3. Click "Create Bucket"

Bucket Configuration Options:

SettingRecommended ValueDescription
Bucket NameCustom (globally unique)e.g., mycompany-images
RegionHong KongLowest latency for Asia Pacific
Storage ClassStandardChoose this for frequent access
Access ControlPrivateMost secure, adjust later

Step 2: Upload Files

Method 1: Console Upload

Good for small numbers of files, testing.

  1. Enter the Bucket
  2. Click "Upload Files"
  3. Select files
  4. Confirm upload

Method 2: ossutil Command Line Tool

Good for bulk files, automation scripts.

# Install ossutil
# Upload single file
ossutil cp localfile.jpg oss://mybucket/path/

# Upload entire folder
ossutil cp -r ./localdir oss://mybucket/path/

Method 3: SDK Integration

Good for embedding in applications.

# Python example
import oss2

auth = oss2.Auth('AccessKeyId', 'AccessKeySecret')
bucket = oss2.Bucket(auth, 'oss-cn-hongkong.aliyuncs.com', 'mybucket')

# Upload file
bucket.put_object_from_file('remote/path/file.jpg', 'local/path/file.jpg')

Step 3: Permission Settings

OSS permissions have three levels:

Bucket ACL (Bucket Permissions)

PermissionDescriptionSuitable For
PrivateAuthorization requiredConfidential data, backups
Public ReadAnyone can readWebsite images
Public Read-WriteAnyone can read/writeStrongly not recommended

Bucket Policy (Access Policy)

More granular permission control, can specify:

  • Which IPs can access
  • Which operations can be performed
  • Time restrictions

RAM User Permissions

Control who can manage this Bucket through RAM (Resource Access Management).

Security Recommendations:

  • Default to "Private"
  • For public files, use signed URLs
  • Never enable "Public Read-Write"

Illustration 3: OSS Bucket Creation Settings

API Integration Guide

OSS provides complete APIs and multi-language SDKs.

Supported SDKs

  • Java
  • Python
  • Node.js
  • PHP
  • Go
  • .NET
  • C/C++
  • Ruby

Common API Operations

OperationPurpose
PutObjectUpload file
GetObjectDownload file
DeleteObjectDelete file
ListObjectsList files
CopyObjectCopy file
GetObjectMetaGet file info

Presigned URL

Allow private files to be temporarily accessed.

# Generate download link valid for 1 hour
url = bucket.sign_url('GET', 'path/to/file.jpg', 3600)
print(url)

This feature is very useful for:

  • Paid content downloads
  • Temporary file sharing
  • Time-limited access

Using with ECS

OSS is often used with Alibaba Cloud ECS:

  • ECS handles dynamic requests
  • OSS stores static files
  • Internal network transfer, no traffic fees

How to design storage architecture to save the most money? Object storage pricing is complex—poor design could cost several times more. Schedule architecture consultation and let us help optimize your storage strategy.


OSS Pricing

OSS costs consist of multiple parts.

Cost Items

Cost ItemBilling MethodReference Price
Storage CostMonthly by capacityFrom $0.02/GB
Request CostBy countFrom $0.01/10K requests
Outbound TrafficBy download volumeFrom $0.076/GB
Intranet TrafficSame regionFree
Data ProcessingImage processing, etc.Separate

Storage Classes and Prices

Storage ClassPrice (approx.)Suitable For
Standard$0.02/GB/monthFrequent access
Infrequent Access$0.015/GB/monthOccasional access (30+ days)
Archive$0.005/GB/monthLong-term backup (90+ days)
Cold Archive$0.002/GB/monthRarely accessed (180+ days)

Money-Saving Tips

1. Choose the Right Storage Class

Use Infrequent Access or Archive for rarely accessed files.

Can save 50-90% on storage costs.

2. Set Lifecycle Rules

Automatically move old files to cheaper storage classes.

Example: Move to Infrequent Access after 30 days, Archive after 90 days.

3. Use CDN

For high download volumes, CDN traffic costs less than direct OSS download.

4. Use Intranet Transfer

ECS and OSS in the same region use intranet—no traffic fees.

5. Clean Up Unused Files

Regularly check and delete unnecessary files.

Especially fragments and historical versions.


Best Practices

Based on practical experience, here are some recommendations.

Bucket Planning

  • Separate Buckets by purpose: images, backups, logs separate
  • Consistent naming: company-purpose-environment (e.g., myco-images-prod)
  • Right region: Put Bucket where your users are

Security

  • Never use Public Read-Write: This is the most common security vulnerability
  • Use RAM sub-accounts: Don't use main account's AccessKey
  • Enable logging: Easy to track who accessed what

Performance Optimization

  • Distribute file naming: Avoid using dates as prefixes (causes hotspots)
  • Multipart upload: Use Multipart Upload for large files
  • Use CDN: Reduce direct OSS access frequency

Illustration 4: OSS Architecture Diagram

FAQ

Q1: What's the difference between OSS and Aliyun Drive?

ItemOSSAliyun Drive
PositionEnterprise storagePersonal cloud drive
Access MethodAPI / SDKApp / Web
BillingPay per useFree / Membership
Target UsersDevelopers, enterprisesGeneral consumers

For personal file storage, see Aliyun Drive Registration Guide.

Q2: Can deleted OSS files be recovered?

Not by default. Deletion is permanent.

But you can enable "Versioning" to retain historical versions.

Q3: Upload speed is slow, what to do?

Possible causes and solutions:

  • Network issue: Check local network
  • Cross-region: Choose the region closest to you
  • Large files: Use Multipart Upload
  • Bandwidth limit: Use transfer acceleration service (extra cost)

Q4: How to set up a custom domain?

  1. Bind domain in Bucket settings
  2. Add CNAME record in DNS
  3. Apply for SSL certificate (can use Alibaba Cloud free certificate)
  4. Enable HTTPS access

Need Help with Cloud Storage Architecture?

Object storage design affects:

  • Cost: Storage class selection, lifecycle policies
  • Performance: Region selection, CDN configuration
  • Security: Permission design, encryption strategy

How CloudInsight Can Help

  • Requirements Analysis: Understand your file types, access patterns, growth expectations
  • Architecture Design: Plan optimal storage tiering strategy
  • Cost Optimization: Find savings, set up automation rules
  • Security Review: Ensure correct permission settings, no data leak risks

Schedule storage architecture consultation and let us design the best solution for your needs.

From a few GB to PB-scale storage, we have experience

👉 Schedule now to optimize your cloud storage architecture


References

  1. Alibaba Cloud OSS Documentation - https://www.alibabacloud.com/help/oss
  2. OSS Pricing - https://www.alibabacloud.com/product/oss/pricing
  3. OSS SDK Downloads - https://www.alibabacloud.com/help/oss/developer-reference/sdk-downloads
  4. OSS Best Practices - https://www.alibabacloud.com/help/oss/best-practices
  5. AWS S3 vs Alibaba Cloud OSS Comparison - https://www.alibabacloud.com/help/oss/compare-with-s3

Need Professional Cloud Advice?

Whether you're evaluating cloud platforms, optimizing existing architecture, or looking for cost-saving solutions, we can help

Book Free Consultation

Related Articles