Skip to main content

Find Your AWS Account, Organization and Export IDs

Launch Stack in AWS discovers these values for you. You need them for Manual Setup, for Enter Account ID if the portal doesn't detect your stack, or to check what the portal found. The portal's Where Do I Find This? help shows the same values.

Run the CLI commands in AWS CloudShell, signed in to the management account (or the standalone account). Data Exports commands always use us-east-1.

ValueConsoleCLI
Account IDThe account menu, top right of the AWS consoleaws sts get-caller-identity --query Account --output text
Organization ID (o-…)AWS Organizations > AWS accounts, at the topaws organizations describe-organization --query Organization.Id --output text
Which account is the management accountAWS Organizations > AWS accounts. It's labelled Management account.aws organizations describe-organization --query Organization.MasterAccountId --output text
Account listAWS Organizations > AWS accountsaws organizations list-accounts --query 'Accounts[?Status==`ACTIVE`].[Id,Name]' --output text
Organization root ID (r-…), for member accountsAWS Organizations > AWS accounts, the Root entryaws organizations list-roots --query 'Roots[0].Id' --output text
Data Export ARN and Export NameBilling and Cost Management > Data Exportsaws bcm-data-exports list-exports --region us-east-1 --query 'Exports[].[ExportName,ExportArn]' --output text
S3 Bucket Name, S3 Prefix and S3 Bucket RegionData Exports, then select the exportaws bcm-data-exports get-export --region us-east-1 --export-arn <arn> --query 'Export.DestinationConfigurations.S3Destination'
File format (must be PARQUET)Data Exports, then select the exportaws bcm-data-exports get-export --region us-east-1 --export-arn <arn> --query 'Export.DestinationConfigurations.S3Destination.S3OutputConfigurations.Format' --output text
KMS Key ARN, only for a customer-managed keyS3 > the bucket > Properties > Default encryptionaws s3api get-bucket-encryption --bucket <bucket> --query 'ServerSideEncryptionConfiguration.Rules[0].ApplyServerSideEncryptionByDefault'
Enter the prefix and the export name separately

AWS delivers files to <prefix>/<export name>/…. S3 Prefix is the value AWS shows as S3Prefix, such as cur2, not the full path. Leave it empty if the export delivers to the bucket root.

A KMS key shown as a key ID or alias needs its full ARN: aws kms describe-key --key-id <value> --query KeyMetadata.Arn --output text.