Manage your Amazon Web Services account ID
Your account ID is a 12 digit number that uniquely identifies your account. By default IAM users in the account sign in using a web URL that includes the account ID. If they don't have the URL, they can provide the account ID on the Amazon sign-in page to sign-in.
If you don't know your account ID:
-
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 can't provide account IDs to users.
Tip
To create a bookmark for your account sign-in page in your web browser, 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.
Topics
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:
Set up an account alias
Many people find words to be easier to remember than numbers, so creating an alias for your account ID can help your users sign-in easier. 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
-
Create, delete, and list 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)
Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/
. -
In the navigation pane, choose Dashboard.
-
In the Amazon Account section, next to Account Alias, choose Create. If an alias already exists, then choose Edit.
-
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)
Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/
. -
In the navigation pane, choose Dashboard.
-
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.
Create, delete, and list 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.
Create, delete, and list 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: