All Products
Search
Document Center

1. Create functions

Last Updated: Dec 23, 2018

Procedures

  1. Log on to the Function Compute console.

  2. Create a service. The Service Name of this example is apigateway-demo, and the Region is China East 2 (Shanghai). Enable Advanced Settings, and configure the project and Logstore. For Role Operation, choose Create New Role. For System Policies, choose AliyunLogFullAccess. Click Authorize and then click OK.

    • About how to create a service in the console, see Create service.

    • Function log entries are saved to the Logstore for debugging.

    • Service Role provides this service with the permission to access other cloud services. For more information about permissions, see Permissions.

  3. Select a service in the left-side navigation pane to enter the new service page.

  4. Click Create Function.

    1. On the page that appears, click Select All and select a development language you are familiar with in the drop-down list. The sample code in this example is described in multiple languages.

    2. Select Empty Function.

    3. Create a function and set the service name, function name, function description, and runtime environment.

    4. Click Next.

    5. Verify that all the information is correct, and click Create.

Next step

Author functions.