GCIH · Question #787
After running the command shown below, which output field contains the user's cleartext account name? aws sts get-caller-identity
The correct answer is B. Arn. The aws sts get-caller-identity command returns three fields - UserId, Account, and Arn - and only the Arn contains the human-readable cleartext identity name. The other fields return numeric or opaque alphanumeric identifiers.
Question
After running the command shown below, which output field contains the user's cleartext account name? aws sts get-caller-identity
Options
- AUserId
- BArn
- CAccount
- DUserName
How the community answered
(44 responses)- A2% (1)
- B91% (40)
- C2% (1)
- D5% (2)
Why each option
The `aws sts get-caller-identity` command returns three fields - UserId, Account, and Arn - and only the Arn contains the human-readable cleartext identity name. The other fields return numeric or opaque alphanumeric identifiers.
UserId returns an opaque alphanumeric identifier such as AIDACKCEVSQ6C2EXAMPLE, which does not contain the cleartext account name.
The Arn (Amazon Resource Name) follows the format `arn:aws:iam::<account-id>:<type>/<name>`, where the trailing component is the cleartext username or role name in plain text. This makes it the only field in the response that exposes the account name in a human-readable form.
The Account field returns only the 12-digit numeric AWS account ID, not a human-readable name.
UserName is not a field returned by `aws sts get-caller-identity`; the command only outputs UserId, Account, and Arn.
Concept tested: AWS STS get-caller-identity Arn field structure
Source: https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html
Topics
Community Discussion
No community discussion yet for this question.