The Creating and Deploying Functions document describes how to create an SCF function by using Serverless Framework. For Serverless Framework itself, this operation means deploying a single-instance serverless application through the SCF component. A serverless application can consist of one or multiple instances, and each component deployment corresponds to one instance. Each instance involves a
serverless.yml file as shown below, which defines certain parameters of the component. Such parameters are used to generate the instance information during deployment. For example,
region defines the resource region.
This document describes single-instance and multi-instance applications and uses actual scenarios as examples to show how to perform project management and resource orchestration for SCF.
In the project of a single-instance application, only one component is imported, and only one component instance will be generated during deployment. The name of the single-instance application is generated by Serverless Framework by default.
Use cases: Serverless Framework is used only as a CLI tool to create and update functions, so you need to orchestrate and manage function resources by yourself.
In the project of a multi-instance application, multiple components are imported, and multiple component instances will be generated during deployment. You need to enter a fixed name for the multi-instance application to ensure that all components are managed under the same application.
Use cases: you need to organize and orchestrate multiple SCF resources in the project through Serverless Framework.
Serverless Framework provides a set of administrative mechanisms for resource orchestration, environment isolation, and grayscale release. In addition to creating SCF functions, Serverless Framework also provides a wealth of components for manipulating various Tencent Cloud services such as API Gateway, COS, and CAM. By using Serverless Framework to develop projects, you can focus on developing your business and improving your efficiency. For more information on project development, please see Project Development.