You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains sensitive information, please do not put it in the project directory, it is recommended to put it in your personal directory and configure it to provider.credentials with an absolute path.
If you do not configure provider.credentials, the default credential configuration of [tencentcli] (https://github.com/TencentCloud/tencentcloud-cli) will be used, but some features cannot work because there is no APPID, see FAQ.
The following is the access to each information.
The tencent_secret_id and tencent_secret_key cloud API keys can be queried in [Tencent Cloud-API Key Management] (https://console.cloud.tencent.com/cam/capi). If not, please create a new one.
TIP: The command sls is shortcut of serverless, so you can simply use sls deploy
Removed from Tencent Cloud scf:
serverless remove
Remote call
serverless invoke -f hello
Log query
serverless logs -f hello
FAQ
APPID
In the example provider.credentials is additionally configured with tencent_app_id, which is optional and only required by some functions.
Here are the features that need to use APPID
Release package file larger than 10MB
If not configured, an error will be displayed when performing the above functions.
cos Authorization
When the package file is larger than 10MB, it will upload package via user's own cos. The upload operation requires the account to have the read and write permissions of the transfer bucket (scf-deployment). If you are using sub-account, you can login owner account [associate CAM policy] (https://cloud.tencent.com/document/product/436/11714) to sub-account
- When the package file is larger than 10MB, it will upload package file via cos, and scf needs to access the user-uploaded package file.
- cos trigger
Usually it is automate authorized by the tool, but if you are using a sub-account secret key, and the current cloud account does not have initial role creation and authorization, and there is no permission to perform initial operations, an error will be reported.
You can use the primary account to execute serverless tencent initcam, which will initialize the role authorization, so that scf can access other business resources (such as object storage, API gateway, etc.)