All Products
Search
Document Center

Overview

Last Updated: Aug 07, 2018

Function Compute is an event-driven service. The execution of a function can be triggered by a certain event. When a request arrives at the API gateway, where Function Compute is set as the backend service, the API gateway calls the function. Function Compute then returns the execution result to the API gateway.

This example describes how to use the API gateway to trigger the function. You can learn how to use the API gateway to call a function, how to use the parameters from the API gateway to call the function, and return the processing result to the API gateway.

Contents

To run a function triggered by the API gateway event source, follow these steps:

  1. Create a function.
  2. Write function code.
  3. Create API, and set Function Compute as the API Gateway backend service in the API Gateway console.
  4. Test the function.

Next step

Create a function.