The Serverless Framework needs access to account credentials for your Tencent Cloud account so that it can create and manage resources on your behalf.
If you already have a Tencent Cloud account, skip to the next step to create an CAM User and Access Key
To create a Tencent Cloud account:
- Open https://cloud.tencent.com/, and then choose Sign up.
- Follow the online instructions.
- Part of the sign-up procedure involves entering a PIN using the phone keypad.
Services in Tencent Cloud, such as SCF, require that you provide credentials when you access them to ensure that you have permission to access the resources owned by that service. To accomplish this Tencent Cloud recommends that you use Cloud Access Management (CAM).
You need to create credentials Serverless can use to create resources in your Project.
- Login to your account and go to the Cloud Access Management (CAM) page.
- Click on Access Key and then Create Key.
- View and copy the APPID, SecretId & SecretKey to a temporary place. (To get the SecretKey, you may need to enter a PIN using the phone keypad.)
- Create a file named
credentialscontaining the credentials that you have collected.
[default] tencent_appid = 1251000000 tencent_secret_id = AKIDteBxxxxxxxxxxnZfk tencent_secret_key = AKID2qsxxxxxxxxxxxxxtTo
Save the credentials file to a folder like
~/.tencent/credentials. Copy the path of the file you saved.
Open up your
serverless.yml file and update the
provider section with
the path to your credentials file (this path needs to be absolute). It should look something like this:
provider: name: tencent credentials: ~/.tencent/credentials