You can use Function Compute to deliver logs to Object Storage Service (OSS) where the logs can be persisted. You can view and analyze persisted logs based on business requirements. This topic describes how to use Function Compute to deliver logs to OSS.
Prerequisites
Make sure that the following prerequisites are met before you can use Function Compute to deliver logs:
- OSS is activated. You can activate OSS on the OSS product page and create an OSS bucket where logs can be stored.
- Function Compute is activated. You can activate Function Compute in the Function Compute console.
Note Log on to the Function Compute console and use an existing Function Compute service to deliver log data.
Background information
- Alibaba Cloud CDN allows you to use Function Compute to deliver logs to OSS. When you enable this feature, the service-linked role AliyunCDNEventNotificationRole is automatically created and assigned to Alibaba Cloud CDN. Alibaba Cloud CDN can assume this role to access Function Compute and automate log delivery.
- Alibaba Cloud CDN is integrated with Function Compute. This allows you to configure functions for common events and filter events by parameter such as domain name. This way, data can be collected from specific domain names. After Alibaba Cloud CDN receives events that meet the filter conditions, it automatically calls functions to process the events and delivers the log entries to OSS.
Scenarios
The log storage feature of Alibaba Cloud CDN retains log data for 30 days free of charge. To persist log data, you can deliver log data to OSS. This facilitates log storage and analytics.
Billing
The log storage feature is free of charge. OSS and Function Compute are billed based on the following rules:
- For more information about the billing rules of OSS, see OSS pricing.
- Function Compute resources are consumed during the log delivery process. Function Compute provides a free quota each month. You are charged for the Function Compute resources that exceed the free quota. For more information, see Function Compute billing methods.
Enable Function Compute for log storage.
Disable Function Compute for log storage
To disable Function Compute for log storage, perform the following steps. Function Compute for log storage is no longer billed after it is disabled.