Difference between revisions of "Aws sts get-caller-identity"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
* <code>[[aws iam get-account-summary]]</code> | * <code>[[aws iam get-account-summary]]</code> | ||
* <code>[[aws iam list-account-aliases]]</code> | * <code>[[aws iam list-account-aliases]]</code> | ||
+ | * [[aws iam create-account-alias]] | ||
* <code>[[aws sts get-session-token]]</code> | * <code>[[aws sts get-session-token]]</code> | ||
* <code>[[aws iam get-user]]</code> | * <code>[[aws iam get-user]]</code> |
Revision as of 11:34, 2 May 2022
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
aws iam get-account-summary
aws iam list-account-aliases
- aws iam create-account-alias
aws sts get-session-token
aws iam get-user
- An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied
See also
Advertising: