Your Amazon account identifiers - Amazon General Reference
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Your Amazon account identifiers

Amazon assigns the following unique identifiers to each Amazon account:

Amazon account ID

A 12-digit number, such as 123456789012, that uniquely identifies an Amazon account. Many Amazon resources include the account ID in their Amazon Resource Names (ARNs). The account ID portion distinguishes resources in one account from the resources in another account. If you are an IAM user, you can sign in to the Amazon Web Services Management Console using either the account ID or account alias.

Canonical user ID

An alpha-numeric identifier, such as 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be, that is an obfuscated form of the Amazon account ID. You can use this ID to identify an Amazon account when granting cross-account access to buckets and objects using Amazon S3. You can retrieve the canonical user ID for your Amazon account as either the root user or an IAM user.

For more information, see Finding the canonical user ID for your Amazon account in the Amazon S3 User Guide.

You must be authenticated with Amazon to view these identifiers.

Warning

Do not provide your Amazon credentials to a third party that needs your Amazon account identifiers to share Amazon resources with you. Doing so would give them the same access to the Amazon account that you have.

Finding your Amazon account ID

You can find the Amazon account ID in the Amazon Web Services Management Console. The location of the account ID in the console depends on whether you are logged in as the root user or an IAM user. The account ID is the same whether you are logged in as the root user or an IAM user.

Prerequisite

You must be signed in to the Amazon Web Services Management Console. For more information, see Signing in to the Amazon Web Services Management Console in the IAM User Guide.

To find your Amazon account ID when signed in as the root user

  1. In the navigation bar on the upper right, choose your account name or number and then choose My Security Credentials.

  2. Expand the Account identifiers section. The account number appears next to the label Amazon Account ID.

To find your Amazon account ID when signed in as an IAM user

  1. In the navigation bar on the upper right, choose your user name and then choose My Security Credentials.

    Tip

    If you do not see the My Security Credentials page, you might be signed in as a federated user, not an IAM user.

  2. At the top of the page, under Account details, the account number appears next to the label Amazon account ID.

To find your Amazon account ID using the Amazon CLI

Use the get-caller-identity command as follows:

aws sts get-caller-identity --query Account --output text