Unlock insights from your message data by enabling log analysis for Alibaba Cloud SMS. This feature is powered by Simple Log Service (SLS), a one-stop solution for log querying, analysis, processing, and consumption. This topic guides you through enabling or disabling this feature.
Before you begin
Activate Alibaba Cloud SMS and SLS.
Log analysis is a paid service. For billing information, refer to Pricing Calculator.
Read and understand the Usage notes of SLS.
Enable log analysis
Log on to the Alibaba Cloud SMS Console.
In the left navigation pane, choose .
Click Authorize.
Click OK. Follow the on-screen instructions to grant Alibaba Cloud SMS the AliyunServiceRoleForDysmsLog role to access SLS.
ImportantOnly an Alibaba Cloud account can perform this one-time authorization.
If you use a Resource Access Management (RAM) user, the RAM user must have the required permissions. For more information, see Authorize RAM users to enable log analysis.
Do not revoke the authorization or delete the RAM role. Otherwise, Alibaba Cloud SMS cannot deliver logs to SLS.
After enabling log analysis for Alibaba Cloud SMS, the system automatically creates a project named sms-log-{AlibabaCloudAccountID} and a dedicated logstore named sms-log.
Log analysis is enabled after the authorization succeeds.
You can view your data in the Log Operations Center, Business Statistics Center, and O&M Center.
Disable log analysis
To disable log analysis, delete the associated RAM roles and SLS project.
Go to the Projects page in the SLS console and delete the
sms-log-{AlibabaCloudAccountID}project.
Go to the Roles page in the RAM console and delete the AliyunServiceRoleForDysmsLog and AliyunServiceRoleForSLSAudit roles.

After deleting these resources, log analysis will be disabled the next day.
The change takes effect the next day. You are billed for the full day on which you disable the feature, as well as the following day. No charges will be incurred after that.
Advanced management
For advanced operations, go to the Log Service (SLS) console. You can configure alerts and notifications, set up real-time data subscription and consumption, manage data shipping, and integrate with data visualization services.
Log on to the Alibaba Cloud SMS Console.
In the left navigation pane, choose .
In the upper-right corner, click Set Log Retention Period.
In the dialog box, click Simple Log Service Console to open the SLS console.

You can perform the following advanced management operations on the dedicated project and logstore for Alibaba Cloud SMS:
Next steps
After your SMS logs are collected in SLS, you can query, download, ship, and process them, or create alerts. For more information, see Common operations on logs of Alibaba Cloud services.
You can export SMS log query results to your computer by downloading the logs on the result page in CSV format or all logs in TXT format. For more information, see Export logs.