You can find the AWS account ID using either the AWS Management Console or the AWS Command Line Interface (AWS CLI). In the console, the location of the account ID depends on whether you’re signed in as the root user or an IAM user. The account ID remains the same whether you’re signed in as the root user or an IAM user.
To perform the following steps, you must have at least the following IAM permissions:
Tip: If you don’t see the Security credentials option, you might be signed in as a federated user with an IAM role, instead of as an IAM user. In this case, look for the entry Account and the account ID number next to it.
Under the Account details section, the account number appears next to AWS account ID.
To perform the following steps, you must have at least the following IAM permission:
aws-portal:ViewAccount
In the navigation bar on the upper right, choose your user name and then choose Security credentials.
Tip: If you don’t see the Security credentials option, you might be signed in as a federated user with an IAM role, instead of as an IAM user. In this case, look for the entry Account and the account ID number next to it.
At the top of the page, under Account details, the account number appears next to AWS account ID.
You can find the canonical user ID for your AWS account using the AWS Management Console or the AWS CLI. The canonical user ID for an AWS account is specific to that account. You can retrieve the canonical user ID for your AWS account as the root user, a federated user, or an IAM user.
To find the canonical user ID for your account when signed in to the console as the root user or an IAM user:
Minimum permissions:
To perform the following steps, you must have at least the following IAM permissions:
aws-portal:ViewAccount
Sign in to the AWS Management Console as the root user or an IAM user.
In the navigation bar on the upper right, choose your account name or number, and then choose “Security credentials”.
Tip: If you don’t see the “Security credentials” option, you might be signed in as a federated user with an IAM role, instead of as an IAM user. In this case, look for the entry “Account” and the account ID number next to it.
Under the “Account details” section, the canonical user ID appears next to “Canonical user ID”. You can use your canonical user ID to configure Amazon S3 access control lists (ACLs).
To find the canonical ID for your account when signed in to the console as a federated user with an IAM role
You must have permission to list and view an Amazon S3 bucket.