edit-icon download-icon

Use template

Last Updated: Oct 16, 2018

The Function Compute (FC) console provides function templates to easily create functions such as web crawlers, automatic image classification, and access to Alibaba Cloud Object Storage Service (OSS) or Table Store that can be customized to fulfill your own requirements. The following example demostrates how to use a web crawler template to create a function for web crawling.

Procedure

  1. Create a FC service named DEMO in the console.

  2. Create a function inside service DEMO, select the image-crawler function template, and leave the Trigger Configurations as Trigger Type: No Trigger.

    step2

  3. In the Configure Function Settings step, provide the Function Name and Function Description (optional).

    step3

  4. In the Configure Function Permissions step, click Authorize, after re-directed, give a Role Name image-crawler-demo-role and a Policy Name image-crawler-demo-policy

    step4.1

    step4.2

  5. In Code Management, edit and customize the code online, replace your region and your bucket name in the code with real values.

    step5

  6. Click the Event and modify the event parameter.

    step6

  7. Invoke the function.

    step7

Conclusion

Using a function template can make permissions configurations and code development easier. More templates will be added overtime to help developers stay focus on business logic development rather than setups.

Thank you! We've received your feedback.