tencent cloud


Creating Functions on Serverless Cloud Framework

Last updated: 2022-12-16 16:42:00


    This document describes how to use the SCF component provided by Serverless Cloud Framework to quickly create and deploy an SCF project. For more information on components and how to use them, please see Components Overview



    Creating function

    Run the following command to quickly create a function in the Node.js language:

    scf init scf-demo

    scf-demo in the command is the Node.js template by default, and you can replace it with function templates in other languages, such as scf-golang, scf-php, and scf-python.

    Deploying function

    Run the following command in the scf-demo directory to deploy the function:

    scf deploy

    A QR code will pop up. Please scan it to authorize and start deployment. After successful deployment, SCF resources will be automatically created.


    If authentication fails, please authorize as instructed in Account and Permission Configuration.

    View function information

    Run the following command to view the information of the deployed SCF resources:

    scf info

    Removing function

    Run the following command to remove the deployed SCF resources:

    scf remove

    Relevant Features

    • For more information on how to use Serverless Cloud Framework to manipulate SCF functions, please see Serverless Cloud Framework.
    • Serverless Web IDE is a browser-based integrated development environment. It delivers an on-cloud development experience comparable to native IDEs. For more information on its features for SCF, please see Serverless Web IDE.
    • The SCF SDK integrates function business flow APIs, which simplifies the invocation of functions. For more information on its feature for functions, please see SDK for Python and SDK for Node.js.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support