All Products
Search
Document Center

Simple Log Service:Enable access logs

Last Updated:Mar 25, 2026

This topic describes how to enable access logs on the Server Load Balancer (SLB) console to collect Layer 7 access logs from Classic Load Balancer (CLB) instances and store them in Log Service.

Prerequisites

Procedure

Important

If you use a RAM user to enable access logs, you must first grant the required permissions to the RAM user. For more information, see Authorize a RAM user.

  1. Log in to the SLB console.

  2. In the top-left corner of the page, select a region.

  3. In the left-side navigation pane, choose Classic Load Balancer (CLB) > Logs > Access Log.

  4. Follow the on-screen instructions to authorize Classic Load Balancer to assume the AliyunLogArchiveRole role to access Log Service.

    This operation is required only when you configure access logs for the first time and you must use an Alibaba Cloud account to complete it.

    Warning

    Do not revoke the authorization or delete the AliyunLogArchiveRole role. Otherwise, CLB cannot send access logs to Log Service.

  5. On the Access Log (Layer 7) page, find the target instance and click Configure in the Actions column.

  6. In the Configure Logging panel, select an available project and Logstore, and then click OK.

    After the configuration is complete, Log Service creates indexes for the selected Logstore by default. If the Logstore already has indexes, Log Service overwrites them.

Related operations

Actions

Description

Query access logs

On the Access Log (Layer 7) page, find the target instance, and then click View Logs in the Actions column. For more information, see Query access logs.

Disable access logs

On the Access Log (Layer 7) page, find the target instance, and then click Delete in the Actions column. For more information, see Disable access logs.

Important

Disabling the access log feature does not automatically delete the project or the logs that have been sent. To avoid unnecessary fees after disabling this feature, delete the corresponding project on the Log Service console. For more information, see Manage projects.

Next steps

After Layer 7 access logs from your CLB instance are sent to Log Service, you can perform various operations on the Log Service console, such as querying, analyzing, downloading, shipping, and processing the logs, or creating alerts. For more information, see Common operations on logs of Alibaba Cloud services.