aws sts get-caller-identity

From wikieduonline
Revision as of 14:05, 2 September 2022 by Cry (talk | contribs) (→‎Related)
Jump to navigation Jump to search

The aws sts get-caller-identity command outputs three pieces of information including the ARN.


ACCOUNT_ID=$(aws sts get-caller-identity --output text --query 'Account')

aws sts get-caller-identity


aws sts get-caller-identity
{
    "UserId": "ZIDBZCTGOUKVXXFNQ5Q3F",
    "Account": "894058868389",
    "Arn": "arn:aws:iam::894058868389:user/your_user"
}

Related

sts:AssumeRole

See also

Advertising: