All Products
Search
Document Center

MaxCompute:Migrate ActionTrail event data to MaxCompute

Last Updated:Dec 05, 2025

ActionTrail lets you track and record the operations performed on your Alibaba Cloud account for the last 90 days. To analyze data over a longer period, you can create a trail to deliver events to MaxCompute for querying and analysis. This topic describes how to configure and use this feature.

Procedure

  1. Activate MaxCompute and DataWorks. For more information, see Activate MaxCompute and DataWorks.

  2. Before you deliver ActionTrail events as a Resource Access Management (RAM) user, you must grant the RAM user permissions to manage single-account trails. For more information, see Grant permissions to a RAM user.

  3. Log on to the ActionTrail console.

  4. In the navigation pane on the left, click Trails. In the top-left corner, select a region.

    A trail is a configuration for delivering ActionTrail events. Trails are classified as single-account trails, multi-account trails, or trails for the Inner-ActionTrail feature based on their creator, applicable scope, and the content they deliver. For more information, see Overview of trails.

  5. On the Trails page, click Create Trail.

  6. On the Quickly Create Trail page, click Create Trail in the message box below the title.

    image

    When you create a trail, ActionTrail automatically creates a service-linked role named AliyunServiceRoleForActionTrail and adds it as the Admin role to the MaxCompute project to which events are delivered. For more information, see ActionTrail service-linked role and Role planning.

    Configure the following parameters and click Confirm.

    • In the Basic Information section, enter a custom Trail Name and select a Trail Event Type.

    • In the Management Event Delivery Settings section, select Delivery to MaxCompute.

      • Set Destination Account to Delivery to Current Account, and configure the following parameters.

        Parameter

        Description

        MaxCompute Region

        • The region where the destination MaxCompute project is located.

        • ActionTrail delivers audit logs to the actiontrail_<Alibaba Cloud account ID> project in the specified MaxCompute region. Because MaxCompute project names must be unique within an Alibaba Cloud account, if a project named actiontrail_<Alibaba Cloud account ID> already exists in the account, events are delivered to that existing project by default.

        Project Quota

        • The quota for MaxCompute.

        • When you create a trail to deliver events to MaxCompute for the first time, you must select a quota for MaxCompute. If no quota is available in the current region, select a different MaxCompute region.

      • Set Destination Account to Delivery to Another Account, and configure Project ARN and RAM Role ARN of MaxCompute.

        To deliver events to another account, you must first create a RAM role in the destination account to grant ActionTrail the necessary permissions. You must also create a MaxCompute project in advance. For more information, see Deliver events from multiple Alibaba Cloud accounts to the same account.

    After a trail is created, events are stored in JSON format in the actiontrail_<trail name> table of the actiontrail_<Alibaba Cloud account ID> project in MaxCompute. Writing ActionTrail event data to the specified MaxCompute table incurs storage fees. For more information, see Storage fees.

References