Duoyun Cloud
Back to Blog
tutorials2026-04-18

Tencent Cloud COS Object Storage Beginner Guide

Tencent CloudCOSObject StorageBeginner

Tencent Cloud COS Object Storage Beginner Guide

Object storage is a cornerstone of modern cloud architecture. Whether you're hosting static website assets, backing up data archives, or building a data lake for analytics, object storage is essential. Tencent Cloud COS (Cloud Object Storage) stands out as a top choice for enterprises with its high reliability, low cost, and rich ecosystem integrations. This guide covers everything you need to get started.

Core Concepts

1.1 Key Terminology

| Term | Description | Analogy | |------|-------------|---------| | Bucket | Container for objects; name is globally unique | Folder/root directory | | Object | Basic storage unit containing data and metadata | File | | Region | Data center location where the bucket resides | Data center location | | Access Domain | URL for accessing the bucket | URL | | SecretKey | Access key for API authentication | Password |

1.2 Comparison with Other Providers

| Feature | Tencent Cloud COS | Alibaba Cloud OSS | AWS S3 | |---------|-------------------|-----------|------| | Storage classes | 4 | 4 | 7+ | | Billing unit | Actual usage | Actual usage | Actual usage | | Free tier | 50 GB for 6 months | None | 5 GB (12 months) | | CDN origin fetch | Free | Free | Paid | | Data durability | 99.9999999999% | 99.9999999999% | 99.9999999999% |

Choosing a Storage Class

COS offers four storage classes. Choosing wisely can significantly reduce costs:

| Storage Class | Use Case | Price (Beijing)/GB/month | Min Storage Duration | Data Retrieval Fee | |--------------|----------|-------------------------|---------------------|-------------------| | Standard | Frequently accessed hot data | ¥0.118 | None | None | | Infrequent Access (IA) | Accessed 1–2 times/month | ¥0.08 | 30 days | ¥0.02/GB | | Archive | Compliance archiving, 1–2 yearly accesses | ¥0.033 | 90 days | ¥0.06/GB | | Deep Archive | Extremely infrequent access | ¥0.012 | 180 days | ¥0.10/GB |

Selection Guide:

  • Website images, videos → Standard
  • Log backups → Infrequent Access
  • Compliance data → Archive
  • Long-term cold data → Deep Archive

Creating a Bucket

Console Steps

  1. Log in to the Tencent Cloud Console and search for "COS"
  2. Go to Bucket ListCreate Bucket
  3. Configure:

| Setting | Recommendation | Notes | |---------|---------------|-------| | Name | my-project-assets | Globally unique, cannot be changed after creation | | Region | ap-beijing | Choose the region closest to your users | | Access权限 | Private Read/Write | Most secure; authorize via signed URLs | | Storage class | Standard | Default; can be adjusted per object later |

Creating via CLI

# Install COSCLI
wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux-amd64
chmod +x coscli-linux-amd64

# Configure credentials
./coscli-linux-amd64 config set -a YOUR_SECRET_ID -s YOUR_SECRET_KEY

# Create bucket
./coscli-linux-amd64 mb cos://my-project-assets -r ap-beijing

Data Upload and Management

Upload Method Comparison

| Method | Use Case | Max Single File | Speed | |--------|----------|----------------|-------| | Console upload | Small files, ad-hoc operations | 5 GB | Moderate | | COSCLI | Batch upload, scripted workflows | Unlimited (multipart) | Fast | | COSCMD | Python environments | Unlimited | Fast | | SDK | Application integration | Unlimited | Depends on implementation | | Migration tool | Migrating from other storage | Unlimited | Fastest |

Large File Multipart Upload

Files over 5 GB must use multipart upload. Even for smaller files, multipart upload improves speed and reliability:

# Upload a large file with automatic multipart
./coscli cp /path/to/large-file.zip cos://my-project-assets/backup/

# Batch upload a directory
./coscli cp -r /path/to/local-dir/ cos://my-project-assets/data/

Lifecycle Management

Lifecycle rules automatically transition storage classes or delete expired objects—essential for cost optimization:

Rule example:
- After 30 days → Transition to Infrequent Access
- After 90 days → Transition to Archive
- After 365 days → Delete

Configure at: Bucket Details → Basic Configuration → Lifecycle

Access Control and Security

Access Control Hierarchy

COS provides multi-layered access control:

| Layer | Mechanism | Priority | |-------|-----------|----------| | Bucket ACL | Public/private read/write | Lowest | | Bucket Policy | Fine-grained conditional authorization | Medium | | CAM Role | Cross-account/cross-service authorization | Highest | | Pre-signed URL | Temporary authorized access | Independent |

Security Best Practices

  1. Least Privilege: Keep buckets private by default, open access as needed
  2. Hotlink Protection: Configure Referer whitelist to prevent unauthorized hotlinking
  3. Data Encryption: Enable server-side encryption (SSE-COS) with Tencent-managed keys
  4. Versioning: Enable to recover accidentally deleted or overwritten objects
  5. Access Logging: Enable for auditing and troubleshooting

CDN Acceleration

Use COS as an origin behind Tencent Cloud CDN for faster content delivery:

  1. Enable the default CDN domain or bind a custom domain in bucket settings
  2. Configure CDN cache rules:
    • Static assets (CSS/JS/images): Cache 30 days
    • Dynamic API: No cache
  3. Enable HTTPS forced redirect

CDN origin-fetch traffic from COS is free—you only pay CDN acceleration fees (¥0.15–0.21/GB).

Common Use Cases

Static Website Hosting

COS supports direct static website hosting without any servers:

Bucket → Basic Configuration → Static Website → Enable
Index document: index.html
Error document: 404.html

With CDN, a static site with 100K daily PVs costs approximately ¥50–100/month—significantly less than an equivalent setup on GCP.

Data Lake Architecture

COS serves as the storage layer for data lakes, integrating deeply with Tencent Cloud EMR and Data Lake Compute (DLC):

Data Sources → COS → DLC/EMR → BI Reports

Backup and Archiving

Build an enterprise-grade backup solution with versioning + lifecycle + cross-region replication:

| Feature | Cost | Description | |---------|------|-------------| | Versioning | Storage fees | Retains all historical versions | | Cross-region replication | Traffic fees | Disaster recovery | | Lifecycle | Free | Automatic tiering for cost savings |

Cost Estimation

For a typical medium-sized project:

| Use Case | Storage Volume | Class | Estimated Monthly Cost | |----------|---------------|-------|----------------------| | Website images | 500 GB | Standard | ¥59 | | Log archives | 2 TB | IA | ¥164 | | Compliance data | 5 TB | Archive | ¥169 | | CDN traffic | 1 TB/month | — | ¥150–210 | | Total | | | ¥542–602/month |

Compared to self-managed NAS, COS eliminates hardware investment and ops overhead, saving 40%+ over a 3-year TCO.

Conclusion

Tencent Cloud COS delivers an easy-to-use interface, flexible storage tiering, and deep integration with the Tencent Cloud ecosystem—making it an excellent object storage choice. Whether for static hosting or data lake storage, COS meets requirements at a reasonable cost.

Duoyun Cloud, as a Tencent Cloud partner, offers COS resource procurement with exclusive discounts. Order through Duoyun to save an additional 5%–10% on COS storage, plus gain Chinese-language technical support, unified multi-cloud billing, and cost optimization advice. Visit duoyun.io for details.

Need Professional Cloud Consulting?

Our cloud architect team will customize the best solution for you — free

Free Consultation

Related Posts

news

Edge Computing Trends Across Major Cloud Providers

2026-04-23
optimization

Cloud Billing Alerts and Budget Management Setup

2026-04-22
news

Tencent Cloud New AI Services Launch

2026-04-22