This document helps you quickly get start with Serverless Cloud Function (SCF).
Tencent Cloud Serverless Cloud Function (SCF) is a serverless execution environment that enables you to build and run applications without having to purchase and manage servers. Simply code in a supported language and set the execution conditions, and your code can be run on the Tencent Cloud infrastructure elastically and securely.
SCF allows you to develop, deploy, and test functions through the SCF console, Serverless Cloud Framework, or TencentCloud API.
New SCF users are entitled to a certain monthly free tier within three months of activation. SCF can be billed in a prepaid (subscription package) or postpaid (pay-as-you-go) manner in USD. To learn more about the resource fees incurred during use of SCF, see Billing Overview.
Before using SCF, you need to sign up for a Tencent Cloud account and complete the identity verification first.
You need to authorize the current service role and grant operation permissions for SCF before accessing your other Tencent Cloud service resources.
Log in to the Tencent Cloud console, select Products > Serverless Cloud Function to enter the SCF console, and follow the prompts to authorize SCF. After completing service authorization to get the relevant resource operation permissions, you can start creating functions.
After editing the function code online, click Save, and the function will be deployed. After the code is deployed in the cloud, SCF can execute the function after a trigger condition is configured. An execution condition of a function is called a trigger. You can configure various types of triggers, such as timer, API Gateway, and COS triggers. For detailed directions on how to configure a trigger, see Trigger Management. SCF currently supports two trigger modes: event-triggered and HTTP-triggered. For more information, see Trigger Overview.
You can directly invoke a function and simulate the triggering event sent by the trigger in the SCF console, and the test result will display the function execution conditions, returned content, and execution log. For more information, see Testing Function.
As a new function type, HTTP-triggered can be directly triggered by HTTP requests, breaking through the limit of JSON event format required by the current event-triggered function type. It has more flexible application scenarios and delivers a development experience much similar to that of native web services.
A common reason is that third-party dependencies have not been packaged and uploaded to the online environment. You can install the dependencies and run the function again for test.
Yes. You can add your own code repository to the function code and upload it to the platform as a zip package.
Yes. When you create or modify a function, select VPC configuration and deploy the function in the same VPC as the CVM or TencentDB instance.
You can bind your independent domain name to the SCF service, so that the service can be accessed at it. For more information, see Configuring a Custom Domain Name. Then you can select Use Existing API Service to create an API Gateway trigger for a function that requires a custom domain name.
If you have any questions or suggestions about SCF, you can send your feedback through the following channels, and we will get back to you accordingly:
Was this page helpful?