Your AWS account ID and its alias - AWS Identity and Access Management

Your AWS 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 AWS sign-in page requires that you provide either the AWS 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 AWS CLI or an AWS SDK with your account credentials, you can obtain your account ID from your configuration files.

  • Ask your local administrator or account owner, AWS 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 AWS account ID

You can view the account ID for your AWS account using the following methods.

View Your Account ID using the console

The account ID is displayed on the IAM dashboard in the AWS 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 AWS 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 AWS account ID, you can create an account alias. This section provides information about AWS 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.aws.amazon.com/console/

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

https://Your_Account_Alias.signin.aws.amazon.com/console/
Considerations
  • Your AWS account can have only one alias. If you create a new alias for your AWS 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 AWS account entities, see IAM and AWS 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 AWS Regions. Each AWS account is scoped to one partition.

    The following are the supported partitions:

    • aws - AWS Regions

    • aws-cn - China Regions

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

Creating, deleting, and listing an AWS account alias

You can use the AWS Management Console, the IAM API, or the command line interface to create or delete your AWS 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 AWS account ID remains active and can be used after you create your AWS account alias.

Create or edit an account alias (console)

You can create, edit, and delete an account alias from the AWS 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 AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.

  2. In the navigation pane, choose Dashboard.

  3. In the AWS 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 AWS 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 AWS 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 AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.

  2. In the navigation pane, choose Dashboard.

  3. In the AWS 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 (AWS 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 AWS Management Console sign-in page URL, run the following command:

To delete an AWS account ID alias, run the following command:

To display your AWS account ID alias, run the following command:

Example Alias commands

To display your AWS account ID alias, run the following command.

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

To create an alias for your AWS 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 AWS 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 (AWS 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 AWS Management Console sign-in page URL, call the following operation:

To delete an AWS account ID alias, call the following operation:

To display your AWS account ID alias, call the following operation: