tencent cloud

Tencent Cloud Lighthouse

DokumentasiTencent Cloud LighthouseTencent Cloud LighthouseCOSComparing Tencent Cloud LighthouseCOS with COS

Comparing Tencent Cloud LighthouseCOS with COS

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-07-30 15:23:23
Compared to COS, Tencent Cloud LighthouseCOS (LHCOS) is a lightweight data storage service developed by Tencent Cloud specifically for small and medium-sized enterprise developers. It is suitable for lightweight storage scenarios such as cloud websites, mini-programs, classroom presentations, cloud disks/image hosting, and so on. Compared to traditional object storage services, it is simpler and lighter, providing you with a cost-effective, minimalist yet fully-featured lightweight storage experience.

Advantages Comparison

For the main differences and advantages between LHCOS and COS, see the table below:
Comparison Item
LHCOS
COS
Supported Region
Public Cloud (Hong Kong (China) and other regions outside Chinese mainland): Hong Kong (China), Singapore, Jakarta, Tokyo, Frankfurt, Virginia (US East), Sao Paulo
Financial Cloud: Not supported
Public Cloud (Chinese mainland regions): Beijing, Shanghai, Guangzhou, Nanjing, Chengdu, Chongqing
Public Cloud (Hong Kong (China) and other regions outside Chinese mainland): Hong Kong (China), Singapore, Jakarta, Seoul, Bangkok, Tokyo, Riyadh, Silicon Valley (US West), Virginia (US East), Sao Paulo, Frankfurt
Financial Cloud: Shenzhen Finance, Shanghai Finance, Beijing Finance
Access Domain
<Bucket-Appid>.cos.<Region>.myqcloud.com, Custom origin server domain name is not supported.
<Bucket-Appid>.cos.<Region>.myqcloud.com, Custom origin server domain name is supported.
Billing
Only storage capacity fees and public network downstream traffic fees are charged.
In addition to storage capacity fees and traffic fees, other billable items such as request fees and retrieval fees are also charged.
Prepaid
-
Supports multiple storage type packages such as storage capacity packages, public network downstream traffic packages, number of requests packages.
Each account supports the purchase of multiple resource packages, and multiple resource packages can be stacked.
Supported Storage Type
Makes no distinction between storage types
Standard Storage, Infrequent Access Storage, Archive Storage, Deep Archive Storage, Intelligent Tiering Storage, and so on.
Object operations
Supports basic operations such as object upload (simple upload, form-based upload, multipart upload), copy, download, delete, and listing. For details, see File Operations.
In addition to basic operations, advanced features such as COS Select, Object Tag, Multi-AZ Storage, and multiple storage types are supported. For details, see COS Feature Overview.
Bucket operations
Supports only basic features, including creating buckets, emptying buckets, deleting buckets, hosting static websites, and setting bucket access permissions. For details, see Bucket operations.
In addition to basic features, advanced features such as lifecycle, version control, bucket inventory, and cross-region replication are supported. For details, see COS Feature Overview.
Lighthouse Integration
-
API
Object-level operations support invoking APIs.
Object-level operations and bucket operations both support invoking APIs.
SDK
Supports COS SDK
Supports COS SDK

Compatible with COS SDK

LHCOS supports invoking via COS SDK, supporting basic object-level operations but not bucket-level operations.
When objects are uploaded to a bucket using the COS SDK, the STORAGE_CLASS parameter must be set to DEFAULT or omitted entirely; setting it to STANDARD is not supported. For a Python SDK example and other invocation methods, refer to Upload File.
# -*- coding=utf-8
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
import sys
import os
import logging

# Normally, the log level uses INFO. When troubleshooting is required, it can be changed to DEBUG, at which time the SDK will print communication information with the server.
logging.basicConfig(level=logging.INFO, stream=sys.stdout)

# 1. Set user attributes, including secret_id, secret_key, region, etc. Appid has been removed from CosConfig. Please include the Appid in the Bucket parameter. The Bucket is composed of BucketName-Appid.
secret_id = os.environ['COS_SECRET_ID'] # User's SecretId. It is recommended to use a sub-account key, as authorization follows the principle of least privilege to reduce usage risks. For obtaining sub-account keys, refer to https://www.tencentcloud.com/document/product/598/37140?from_cn_redirect=1
secret_key = os.environ['COS_SECRET_KEY'] # User's SecretKey. It is recommended to use a sub-account key, as authorization follows the principle of least privilege to reduce usage risks. For obtaining sub-account keys, refer to https://www.tencentcloud.com/document/product/598/37140?from_cn_redirect=1
region = 'ap-beijing' # Replace with the user's region. The region to which the created bucket belongs can be viewed in the console at https://console.tencentcloud.com/cos5/bucket
# For a list of all regions supported by COS, refer to https://www.tencentcloud.com/document/product/436/6224?from_cn_redirect=1
token = None # If using permanent credentials, the token does not need to be entered. If using temporary credentials, it must be provided. For guidance on generating and using temporary credentials, refer to https://www.tencentcloud.com/document/product/436/14048?from_cn_redirect=1
scheme = 'https' # Specifies the protocol (http/https) used to access COS. The default is https, and this field is optional.

config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key, Token=token, Scheme=scheme)
client = CosS3Client(config)

# Method 1: Explicitly set StorageClass to DEFAULT
file_name = 'test.txt'
with open('test.txt', 'rb') as fp:
response = client.put_object(
Bucket='examplebucket-1250000000', # The Bucket is composed of BucketName-APPID
Body=fp,
Key=file_name,
StorageClass='DEFAULT',
ContentType='text/html; charset=utf-8'
)
print(response['ETag'])
# Method 2: Do not set the StorageClass parameter
file_name = 'test.txt'
with open('test.txt', 'rb') as fp:
response = client.put_object(
Bucket='examplebucket-1250000000', # The Bucket is composed of BucketName-APPID
Body=fp,
Key=file_name,
ContentType='text/html; charset=utf-8'
)
print(response['ETag'])


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan