Alibaba Cloud OSS Complete Tutorial: Object Storage Setup, Pricing, and Use Cases [2025]
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.

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?
| Comparison | Regular Hard Drive | OSS Object Storage |
|---|---|---|
| Capacity Limit | Fixed (buy what you use) | Unlimited |
| Expansion Method | Buy new drives | Auto-scaling |
| Access Method | File path | HTTP URL / API |
| Pricing | One-time purchase | Pay for what you use |
| Reliability | Single point of failure risk | Multiple 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?
| Comparison | Alibaba Cloud OSS | AWS S3 | GCP Cloud Storage |
|---|---|---|---|
| Storage Price | From $0.02/GB/month | From $0.023/GB/month | From $0.02/GB/month |
| Request Cost | Cheaper | Medium | Medium |
| Traffic Cost | From $0.076/GB | From $0.09/GB | From $0.12/GB |
| China Regions | Most complete | Limited | None |
| Global Regions | 29 | 30+ | 35+ |
| Ecosystem Integration | Alibaba Cloud services | AWS services | GCP services |
| API Compatibility | S3 compatible | Native | S3 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

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
- Log into Alibaba Cloud console
- Find "Object Storage OSS"
- Click "Create Bucket"
Bucket Configuration Options:
| Setting | Recommended Value | Description |
|---|---|---|
| Bucket Name | Custom (globally unique) | e.g., mycompany-images |
| Region | Hong Kong | Lowest latency for Asia Pacific |
| Storage Class | Standard | Choose this for frequent access |
| Access Control | Private | Most secure, adjust later |
Step 2: Upload Files
Method 1: Console Upload
Good for small numbers of files, testing.
- Enter the Bucket
- Click "Upload Files"
- Select files
- 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)
| Permission | Description | Suitable For |
|---|---|---|
| Private | Authorization required | Confidential data, backups |
| Public Read | Anyone can read | Website images |
| Public Read-Write | Anyone can read/write | Strongly 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"

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
| Operation | Purpose |
|---|---|
| PutObject | Upload file |
| GetObject | Download file |
| DeleteObject | Delete file |
| ListObjects | List files |
| CopyObject | Copy file |
| GetObjectMeta | Get 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 Item | Billing Method | Reference Price |
|---|---|---|
| Storage Cost | Monthly by capacity | From $0.02/GB |
| Request Cost | By count | From $0.01/10K requests |
| Outbound Traffic | By download volume | From $0.076/GB |
| Intranet Traffic | Same region | Free |
| Data Processing | Image processing, etc. | Separate |
Storage Classes and Prices
| Storage Class | Price (approx.) | Suitable For |
|---|---|---|
| Standard | $0.02/GB/month | Frequent access |
| Infrequent Access | $0.015/GB/month | Occasional access (30+ days) |
| Archive | $0.005/GB/month | Long-term backup (90+ days) |
| Cold Archive | $0.002/GB/month | Rarely 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

FAQ
Q1: What's the difference between OSS and Aliyun Drive?
| Item | OSS | Aliyun Drive |
|---|---|---|
| Position | Enterprise storage | Personal cloud drive |
| Access Method | API / SDK | App / Web |
| Billing | Pay per use | Free / Membership |
| Target Users | Developers, enterprises | General 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?
- Bind domain in Bucket settings
- Add CNAME record in DNS
- Apply for SSL certificate (can use Alibaba Cloud free certificate)
- 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
- Alibaba Cloud OSS Documentation - https://www.alibabacloud.com/help/oss
- OSS Pricing - https://www.alibabacloud.com/product/oss/pricing
- OSS SDK Downloads - https://www.alibabacloud.com/help/oss/developer-reference/sdk-downloads
- OSS Best Practices - https://www.alibabacloud.com/help/oss/best-practices
- 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 ConsultationRelated Articles
Alibaba Cloud International Complete Guide: Registration, Services, and Pricing for International Users [2025]
What's the difference between Alibaba Cloud International and China site? This article details how international users can register on the International site, payment method setup, main services introduction, pricing and discounts, plus a complete comparison with the China site to help you make the right choice.
Alibaba CloudAliyun Drive Registration Guide: Download, Usage, and Account Sharing [2025]
How do international users register for Aliyun Drive? This article provides a complete tutorial with screenshots, including overseas phone registration, PC/mobile download, share link creation, WebDAV setup, and other advanced features to help you get started with this unlimited-speed cloud storage.
Alibaba CloudAlibaba Cloud AI Services: Tongyi LLM, Bailian Platform, DeepSeek Integration Guide
What AI services does Alibaba Cloud offer? This article introduces the Tongyi (Qwen) large language models, Bailian platform, Model Gallery, and DeepSeek integration, with comparisons to AWS Bedrock and GCP Vertex AI.