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 users are entitled to a certain free tier of resource usage and invocations each month as shown below. SCF is billed by the actual Tencent Cloud resource usage and settled hourly in USD. You need to understand the resource fees incurred during use of SCF. For more information, see Billing Overview.
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 Creating Trigger. 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 function 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: