Use the general configuration of COS in third-party applications compatible with S3
Last updated: 2020-03-30 16:03:14PDF
Amazon Simple Storage Service (Amazon S3, hereinafter referred to as S3) is one of the earliest Tencent Cloud services launched by AWS. After years of development, S3 Protocol has actually become the standard in Cloud Object Storage industry. Tencent Cloud Cloud Object Storage COS (hereinafter referred to as COS) provides a S3-compatible implementation, so you can use COS services directly in most S3-compatible applications. This article focuses on how to configure such applications to use COS services.
Confirm whether the application can use the COS service
- If you see something similar in the description of the application
S3 CompatibleWord, then COS services can be used in most cases. If you find that some of the functions of the application cannot be used properly in the course of actual use, you can contact us Submit a ticket For consultation, when submitting Ticket, please state the guidelines you see in this document, and provide the name of the relevant application and screenshots and other information, so that we can help you solve the problem more quickly.
- If your application only describes the support
Amazon S3This indicates that the application can use S3 service, but whether it can use COS service needs to be further tried in the relevant configuration, which will be further explained in the following configuration instructions.
Prepare the COS service
Step 1: sign up for Tencent Cloud account
(if you are already registered with Tencent Cloud, you can ignore this step. )
Step 2: complete Identity verification
(if completed, this step can be ignored. )
For details of Verification's process, see Introduction of Identity verification .
Step 3: Enable COS service
Step 4: prepare APPID and Access keys
In the Access Management console API Key Management Get and record in the page Appid 、 SecretID and SecretKey .
Step 5: create Bucket
Some of you apply the built-in process of creating Bucket. If you want the app to create Bucket, you can ignore this step.
In Cloud Object Storage console Left sidebar, click [Bucket list] to enter the Bucket management page.
Click [create Bucket] and enter Bucket information.
- Name: Bucket's name, such as examplebucket.
- Region: Bucket storage area, choose the nearest area with you, for example, I am in "Shenzhen", the region can choose "Guangzhou".
- Access Permission: Bucket Access Permission, here we choose "private reading and writing".
Click "OK" to create Bucket.
Configure the COS service in the application
Most applications have similar configuration items when configuring the storage services they use. The common names and descriptions of these configuration items are listed below:
If you have any questions during the configuration process, you can also contact us Submit a ticket Consult, when submitting Ticket, please state the guidelines you see in this document, and provide the name of the relevant application and screenshots and other information, so that we can help you solve the problem more quickly.
|Common name of the configuration item||Related instructions|
|Provider / service provider /|
Storage service provider /
|The main purpose here is to choose which kind of storage the application should use. There may be the following situations:|
|Service Endpoint / Service address / Service & nbsp;URL/Endpoint/Custom Endpoint/Server URL, etc.||This is used for the service address of Enter S3 compatible service. When using COS service, the service address of Enter COS here is in the form:|
Do you need Enter?
In the application, you can only create or select Bucket in the region specified in the service address.
|Access Key/Access Key ID etc.||Here EnterStep 4Recorded inSecretID.|
Secret Access Key etc.
|Here EnterStep 4Recorded inSecretKey.|
|Region / Region, etc.||Select default, automatic, Auto, or Automatic.|
|Bucket / Bucket, etc.||Select or enter an existing Bucket name in the format|
As described above, Bucket here will be limited to the region specified by the service address, and Bucket from other regions will not be listed or cannot be used normally. If you need to create a new Bucket, then the newly created Bucket name also needs to match that mentioned above.
Other items and advanced configuration instructions
In addition to the above basic configuration, some applications also have some other items and advanced configurations. The following will provide a description of the features of some COS, so that you can better use COS services in your applications.
- Service Port and Protocol
COS service supports HTTP Protocol and HTTPS Protocol, both of which use Protocol's default ports 80 and 443. for security reasons, we recommend that you give priority to using COS service through HTTPS Protocol.
- Path-Style and Virtual Hosted-Style
COS supports two usage styles at the same time.
- AWS V2 signature and AWS V4 signature
COS supports both signature formats.
COS does not guarantee full compatibility with S3. If you encounter any problems when using COS services in your application, please feel free to contact us. Submit a ticket Consult, when submitting Ticket, please state the guidelines you see in this document, and provide the name of the relevant application and screenshots and other information, so that we can help you solve the problem more quickly.