tencent cloud

masukan

Use the general configuration of COS in third-party applications compatible with S3

Terakhir diperbarui:2024-03-25 15:16:26
    Amazon Simple Storage Service (S3) is one of the earliest cloud services launched by AWS. After many years of development, the S3 protocol has become a de facto standard in the object storage field. Tencent Cloud Object Storage (COS) provides an S3-compatible implementation scheme, so you can directly use the COS service in most S3-compatible applications. This document describes how to configure such applications to use COS.

    Prerequisites

    Checking whether the application can use COS

    An application with S3 Compatible in its description can use COS in most cases. If you find that some of its features cannot work properly, contact us for assistance, and be sure to indicate that you followed the steps in this document and provide information such as the application name and screenshots.
    If your application description only states that Amazon S3 is supported, it means that the application can use the S3 service, but whether it can use COS needs to be further evaluated in relevant configurations as detailed below.

    Preparing COS service

    Step 1. Sign up for a Tencent Cloud account

    (If you already have a Tencent Cloud account, skip this step.)
    

    Step 2. Verify your identity

    (If you have already done so, skip this step.)
    
    For more information on how to verify your identity, see Identity Verification Guide.

    Step 3. Activate the COS service

    

    Step 4. Prepare the APPID and access key

    Get and note down the APPID, SecretId, and SecretKey on the API Key page in the CAM console.
    
    
    

    Step 5. Create a bucket

    Create a COS bucket as instructed in Creating a Bucket.
    Some applications have a built-in process for creating buckets. If you want such applications to create buckets, skip this step.

    Configuring COS Service in Application

    Basic configuration

    Most applications have similar configuration items for using a storage service. The common names and descriptions of these configuration items are as listed below:
    Note:
    If you have any questions during the configuration, contact us for assistance, and be sure to indicate that you followed the steps in this document and provide information such as the application name and screenshots.
    Common Configuration Item Name
    Description
    Provider, service provider, storage service provider, storage provider, etc.
    Select which storage service the application should use. There may be the following cases:
    If an option has text like S3 Compatible Storage/S3 Compatible, then it will be used first.
    If an option only has text like Amazon Web Services/AWS/Amazon S3, then use it but pay attention to our further instructions during configuration.
    If there is no similar option, but the application description mentions that the application supports S3 services or S3-compatible services, then you can continue with the configuration below, but you also need to pay attention to our further instructions.
    In other cases, the application may not be able to use COS.
    Service endpoint, service address, service URL, endpoint, custom endpoint, server URL, etc.
    This indicates the address of an S3-compatible service. If you use COS, enter the COS service address here in the format of cos.<Region>.myqcloud.com or https://cos.<Region>.myqcloud.com
    .Whether https:// needs to be entered is determined by the application, and you can make some attempts by yourself. Here,<Region> indicates the availability region of COS.
    In the application, you can only create or select a bucket in the region specified in the service address.
    For example, if your bucket is in Guangzhou region, the service address should be configured as cos.ap-guangzhou.myqcloud.com; otherwise, you cannot find the bucket in Guangzhou in the application.
    If only Amazon S3 can be selected as the application service provider and the service address can be configured, then you can change the service address to the aforementioned cos.<Region>.myqcloud.com or https://cos.<Region>.myqcloud.com.
    If the service address cannot be configured or there is no such configuration item, the application cannot use COS.
    Access key, access key ID, etc.
    Enter the SecretId obtained in step 4.
    Secret key, secret, secret access key, etc.
    Enter the SecretKey obtained in step 4.
    Region, etc.
    Select "Default", "Auto", or "Automatic".
    Bucket, etc.
    You can select or enter the name of an existing bucket in the format of <BucketName-APPID>, such as examplebucket-1250000000. Here, BucketName is the name you entered when you created the bucket in step 5, and APPID is the `APPID` obtained in step 4. As described above, the bucket must be in the region specified by the service address, and buckets in other regions will not be listed or cannot work properly. If you need to create a bucket, the name of the new bucket should be in the format of <BucketName-APPID> as mentioned above; otherwise, it cannot be properly created.

    Other advanced configuration items

    In addition to the above basic configuration items, some applications have other advanced configuration items. The following describes some COS features for you to better use COS in such applications.
    Service port and protocol COS supports both HTTP and HTTPS protocols, with the default ports 80 and 443 used by default. For security considerations, we recommend you use COS over the HTTPS protocol preferably.
    Path-Style and Virtual Hosted-Style COS supports both styles.
    AWS v2 and AWS v4 signatures COS supports both signature formats.

    Summary

    COS does not guarantee full compatibility with S3. If you have any questions when using COS in your application, contact us for assistance, and be sure to indicate that you followed the steps in this document and provide information such as the application name and screenshots.
    Hubungi Kami

    Hubungi tim penjualan atau penasihat bisnis kami untuk membantu bisnis Anda.

    Dukungan Teknis

    Buka tiket jika Anda mencari bantuan lebih lanjut. Tiket kami tersedia 7x24.

    Dukungan Telepon 7x24