All Products
Search
Document Center

Overview

Last Updated: Oct 18, 2018

Function Compute supports HTTP triggers. Functions that have HTTP triggers configured can be triggered for execution by HTTP requests. At this point, the function can be considered like a web server, which receives HTTP requests and returns the processing results to the client.

After binding HTTP triggers, you can access the functions through the default addresses <account_id>.<region>.fc.aliyuncs.com/<version>/proxy/<serviceName>/<functionName>/[action?queries] provided by Function Compute. If you want to access the functions through custom domain names, bind the custom domain names in Function Compute. This tutorial describes how to bind the custom domain names.

Scenario

Building web servers that are based on HTTP triggers. This tutorial uses functions f1 and f2 as examples. These functions only print out the requests as are.

Expected result

Execution of functions can be triggered by accessing them with custom domain names.

Prerequisite

The ICP registration of your domain name has already been transferred to Alibaba Cloud. Alternatively, you have obtained or reregistered the ICP registration for the domain names through Alibaba Cloud. For more information about ICP registration, see ICP registration guide.

Procedure

This tutorial contains the following steps:

  1. Build web servers based on HTTP triggers.
  2. Resolve domain names.
  3. Bind custom domain names in Function Compute.
  4. Test functions.
  5. Send requests through custom domain names to trigger executions of functions and check the results.

For more information about custom domain names, see Binding custom domain name.

What to do next

  1. Set HTTP triggers and write handler functions.