AWS account identifiers

There are 2 types of account identifiers.

AWS account ID

AWS account ID is a 12-digit number, such as 123456789012, that uniquely identifies an AWS account. Account IDs are not considered sensitive information. Many AWS 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 AWS 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 AWS account ID. Canonical user IDs are not considered sensitive information. You can use this ID to identify an AWS account when granting cross-account access to buckets and objects using Amazon S3. You can retrieve the canonical user ID for your AWS account as either the root user or an IAM user.

How can I find my AWS account ID?

Management Console

It’s located at the top right corner under your name.


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

Find my current region

There are many regions in the world and each one has an endpoint name. For example, we do not use “US East (N. Virginia)” but we use us-east-1 instead. To find the endpoint name, you may refer to the region endpoint table.

To find your current endpoint in CLI:

aws configure get region
aws ap-east-1

, ,