Log Service allows you to create a scheduled SQL job by using the default role AliyunLogETLRole or a custom role. This topic describes how to create and use the default role AliyunLogETLRole.
Background
The default role AliyunLogETLRole includes the necessary permissions to run SQL analysis on a source logstore or metricstore and write the results to a destination logstore or metricstore. Therefore, you only need to create the role. No additional permissions are required.
Create the default role AliyunLogETLRole
You can create AliyunLogETLRole in one of the following two ways.
-
Only an Alibaba Cloud account or a RAM administrator can perform this operation.
-
If AliyunLogETLRole already exists in your Alibaba Cloud account, you do not need to re-create it.
-
Method 1: Click Cloud Resource Access Authorization and follow the on-screen instructions to create the role.
-
Method 2: In the Create Scheduled SQL panel, click Authorize under default role and follow the on-screen instructions to create the role.

Next steps
When you create a scheduled SQL job, set Write Authorization and SQL Execution Authorization to default role. For more information, see Create a scheduled SQL job.