This document describes how to create a layer in the SCF console.
Directions
1. Log in to the SCF console and select Advanced capabilities > Layer on the left sidebar. 2. On the Layer management page, select the target region and click Create.
3. On the Create layer page, set the layer information based on your actual needs as shown below:
Layer name: Enter the layer name.
Description: Enter the descriptive information of the layer as needed.
Submitting method: Local ZIP file, Local folder, and Upload a ZIP pack via COS are supported. Select an appropriate method based on your actual needs.
Local ZIP file: Click Upload, and upload a code pack in ZIP format. It supports a maximum of 50 MB.
Local Folder: Click Upload, and select a folder. It supports a maximum of 250 MB. This method does not retain the file executable permissions after uploading. If any executable file is included, set the executable permissions locally before uploading them using the ZIP pack method.
Upload a ZIP pack via COS: Choose the COS bucket as the event source. The bucket must be in the same region as the function. Enter the COS object file path starting from the root directory of the bucket ("/") to the complete ZIP code file path.
Add runtime environment: Add the runtime environments (up to 5) that are compatible with this layer.
Tag: It is the business tag to which the resources of this layer belong. Only the users with matching tags can see the resources. When adding the layer resources to function services, you can only add the layer resources that match the user's tags.
4. Click OK, and then you can see the created layer in the layer list.
Was this page helpful?