All Products
Search
Document Center

AnalyticDB:Create an AccessKey pair

Last Updated:Mar 28, 2026

An AccessKey pair is a permanent access credential that lets tools like APIs, CLIs, SDKs, and Terraform authenticate to Alibaba Cloud programmatically. It cannot be used to log on to the console.

Each AccessKey pair consists of two components:

ComponentPurpose
AccessKey IDIdentifies the user
AccessKey secretVerifies the user's identity and signs requests

Both components are generated by Resource Access Management (RAM) and encrypted during storage and transmission.

Important

Avoid creating AccessKey pairs for your Alibaba Cloud account. A leaked credential exposes all resources under the account. Use a RAM user with scoped permissions instead.

Create an AccessKey pair for a RAM user

Use this procedure if you are an Alibaba Cloud account owner, a RAM administrator, or a RAM user with permissions to manage AccessKey pairs.

Prerequisites

Before you begin, ensure that you have:

  • An Alibaba Cloud account, RAM administrator access, or a RAM user account with permissions to manage AccessKey pairs. To grant a RAM user these permissions, see Manage security settings of RAM users

Limits

  • The AccessKey secret is shown only once, at creation time. Save it immediately — it cannot be retrieved later.

  • Each RAM user can have a maximum of two AccessKey pairs.

Steps

  1. Log on to the RAM console.

  2. In the left-side navigation pane, choose Identities > Users.

  3. On the Users page, click the username of the RAM user.

  4. On the Authentication tab, go to the AccessKey section and click Create AccessKey.

    image

  5. Review the credential options for your use case. If an AccessKey pair is required, select a scenario, select I confirm that it is necessary to create an AccessKey, and click Continue.

    Note

    Before proceeding, review the alternative credential options shown in the dialog. Temporary credentials (such as RAM roles) are more secure than long-term AccessKey pairs.

    image

  6. In the Create AccessKey dialog box, copy and save both the AccessKey ID and AccessKey secret, then click OK.

    image

Create an AccessKey pair for an Alibaba Cloud account

Important

Creating AccessKey pairs for an Alibaba Cloud account is not recommended. A leaked credential gives full access to all resources under the account. Use a RAM user with scoped permissions instead.

Use this procedure only if your use case requires a root account credential.

Limits

  • The AccessKey secret is shown only once, at creation time. Save it immediately — it cannot be retrieved later.

  • Each Alibaba Cloud account can have a maximum of five AccessKey pairs.

Steps

  1. Log on to the Alibaba Cloud Management Console with your Alibaba Cloud account.

  2. In the upper-right corner, move the pointer over your profile picture and click AccessKey.

    image

  3. In the Main Account AccessKey is not recommended dialog box, select I am aware of the security risks of using a main account AccessKey, then click use Main Account AccessKey.

    image

  4. On the AccessKey page, click Create AccessKey.

    image

  5. In the Create Main Account AccessKey dialog box, select I am aware of the security risks of using a main account AccessKey, then click use Main Account AccessKey.

    image

  6. In the Create AccessKey dialog box, copy and save both the AccessKey ID and AccessKey secret, select I have saved the AccessKey Secret, then click OK.

    image