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.
This document describes the usage process of SCF and provides multiple examples for function creation, deployment, and testing as well as service building through the SCF Console, SCF CLI, and SCF VS Code plugin.
The following is the flow chart and basic steps of using SCF:
- Prepare: sign up for a Tencent Cloud Account, activate the SCF service, configure a basic development environment, etc.
- Write function: a function is the basic unit of scheduling and operation, and you must follow the function API specifications when writing a function.
- Test locally: you can debug the code locally and then deploy it in the cloud.
- Deploy function (including configuring trigger): after the code is deployed in the cloud, SCF can execute the function after a triggering condition are configured. The execution condition of a function is called a trigger. You can configure various types of triggers, such as timer, API Gateway, and COS triggers.
- Test in cloud: after the function is deployed in the cloud, you can test it through the configured trigger.
- View log: SCF supports displaying historical or real-time function logs in various ways.
- View monitoring information: you can stay on top of the function running status by viewing monitoring metrics.
- Configure alarm: alarming is critical for online production business. After an alarm is configured, you can receive alarm messages promptly when an exceptional situation occurs in the business.
The getting started document can guide you through the complete process of using SCF. You can further familiarize yourself with SCF and developer tools through the following examples:
The Tencent Cloud Serverless team provides a wide variety of developer tools to help you use SCF:
You can also see How SCF Works, Development Guide, and Best Practice to learn more about how to use SCF to build production systems.