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.
Create a FC service named DEMO in the console.
Create a function inside service DEMO, select the image-crawler function template, and leave the Trigger Configurations as Trigger Type: No Trigger.
In the Configure Function Settings step, provide the Function Name and Function Description (optional).
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
In Code Management, edit and customize the code online, replace your region and your bucket name in the code with real values.
Click the Event and modify the event parameter.
Invoke the function.
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.