Your Amazon Web Services account ID and its alias - Amazon Identity and Access Management
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 (PDF).

Your Amazon Web Services account ID and its alias

IAM users in the account sign in using a web URL that includes either the account alias or an account ID. If you don't have the URL, the Amazon sign-in page requires that you provide either the Amazon Web Services account alias or account ID.

If you don't know your account ID or alias:

  • Check your browser history. If you have signed in previously, it could be stored in your recent web sites.

  • If you have configured the Amazon CLI or an Amazon SDK with your account credentials, you can obtain your account ID from your configuration files.

  • Ask your local administrator or account owner, Amazon cannot provide account IDs to users.

Tip

To create a bookmark for your account sign-in page in your web browser, you should manually type the sign-in URL in the bookmark entry. Don't use your web browser's "bookmark this page" feature because that captures information specific to your current browser session that interfere with future visits to the sign-in page.

View your Amazon Web Services account ID

You can view the account ID for your Amazon Web Services account using the following methods.

View Your Account ID using the console

The account ID is displayed on the IAM dashboard in the Amazon Web Services account section. There are additional ways to view your account ID in the console depending on your user type. If you have assumed a role, Security credentials is not available.

User type Procedure

Root user

In the navigation bar at the upper right, choose your user name and then choose Security credentials. The account number appears under Account identifiers.

IAM user

In the navigation bar at the upper right, choose your user name, the account ID is displayed above your user name. Choose Security credentials. The account number appears under Account details.

Federated user

In the navigation bar at the upper right, choose your user name, the account ID is displayed above your user name.

Assumed role

In the navigation bar at the upper right, choose the Support icon, and then choose Support Center from the list. Your currently signed-in 12-digit account number (ID) appears in the Support Center navigation pane.

View Your Account ID using the Amazon CLI

Use the following command to view your user ID, account ID, and your user ARN:

View Your Account ID using the API

Use the following API to view your user ID, account ID, and your user ARN:

About account aliases

If you want the URL for your sign-in page to contain your company name (or other friendly identifier) instead of your Amazon Web Services account ID, you can create an account alias. This section provides information about Amazon Web Services account aliases and lists the API operations that you use to create an alias.

Your sign-in page URL has the following format, by default.

https://Your_Account_ID.signin.amazonaws.cn/console/

If you create an Amazon Web Services account alias for your Amazon Web Services account ID, your sign-in page URL looks like the following example.

https://Your_Account_Alias.signin.amazonaws.cn/console/
Considerations
  • Your Amazon Web Services account can have only one alias. If you create a new alias for your Amazon account, the new alias overwrites the previous alias, and the URL containing the previous alias stops working.

  • The account alias must contain only digits, lowercase letters, and hyphens. For more information on limitations on Amazon account entities, see IAM and Amazon STS quotas.

  • The account alias must be unique across all Amazon Web Services products within a given network partition.

    A partition is a group of Amazon Regions. Each Amazon account is scoped to one partition.

    The following are the supported partitions:

    • aws - Amazon Regions

    • aws-cn - China Regions

    • aws-us-gov - Amazon GovCloud (US) Regions

Creating, deleting, and listing an Amazon Web Services account alias

You can use the Amazon Web Services Management Console, the IAM API, or the command line interface to create or delete your Amazon Web Services account alias.

Note

Account aliases are not secrets, and they will appear in your public-facing sign-in page URL. Do not include any sensitive information in your account alias.

The original URL containing your Amazon Web Services account ID remains active and can be used after you create your Amazon Web Services account alias.

Create or edit an account alias (console)

You can create, edit, and delete an account alias from the Amazon Web Services Management Console.

Minimum permissions

To perform the following steps, you must have at least the following IAM permissions:

  • iam:ListAccountAliases

  • iam:CreateAccountAlias

To create or edit an account alias (console)
  1. Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/.

  2. In the navigation pane, choose Dashboard.

  3. In the Amazon Account section, next to Account Alias, choose Create. If an alias already exists, then choose Edit.

  4. In the dialog box, enter the name you want to use for your alias, then choose Save changes.

Note

You can have only one alias associated with your Amazon Web Services account at a time. If you create a new alias, the previous alias is removed, and the sign-in URL that was associated with the previous alias stops working.

Delete an account alias (console)

You can delete an account alias from the Amazon Web Services Management Console.

Minimum permissions

To perform the following steps, you must have at least the following IAM permissions:

  • iam:ListAccountAliases

  • iam:CreateAccountAlias

  • iam:DeleteAccountAlias

To delete an account alias (console)
  1. Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/.

  2. In the navigation pane, choose Dashboard.

  3. In the Amazon Account section, next to Account Alias, choose Delete.

Note

The only sign-in uRL for your account is based off your account ID. Any attempts to connect to the alias URL are not redirected.

Creating, deleting, and listing aliases (Amazon CLI)

Note

To use the following commands, you must have at least the following IAM permissions:

  • iam:ListAccountAliases

  • iam:CreateAccountAlias

  • iam:DeleteAccountAlias

To create an alias for your Amazon Web Services Management Console sign-in page URL, run the following command:

To delete an Amazon Web Services account ID alias, run the following command:

To display your Amazon Web Services account ID alias, run the following command:

Example Alias commands

To display your Amazon Web Services account ID alias, run the following command.

$ aws iam list-account-aliases { "AccountAliases": [ "myaccountalias" ] }

To create an alias for your Amazon Web Services Management Console sign-in, run the following command:

$ aws iam create-account-alias \ --account-alias myaliasname

This command produces no output if it's successful.

To delete an Amazon Web Services account ID alias, run the following command.

$ aws iam delete-account-alias \ --account-alias myaliasname

This command produces no output if it's successful.

Creating, deleting, and listing aliases (Amazon API)

Note

To use the following API operations, you must have at least the following IAM permissions:

  • iam:ListAccountAliases

  • iam:CreateAccountAlias

  • iam:DeleteAccountAlias

To create an alias for your Amazon Web Services Management Console sign-in page URL, call the following operation:

To delete an Amazon Web Services account ID alias, call the following operation:

To display your Amazon Web Services account ID alias, call the following operation: