AWS CLI IAM and STS Cheat Sheet/Get current IAM user or a named user

Read user details.

Section: IAM Users and Groups

Get current IAM user or a named user

bash
bash
aws iam get-user
Explanation

Without `--user-name`, this can return details for the current IAM user identity.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing IAM Users and Groups
List IAM users
Show IAM users in the account.
OpenIn sheetbashsame section
Create an IAM user
Create a new user principal.
OpenIn sheetbashsame section
Delete an IAM user
Remove a user principal.
OpenIn sheetbashsame section
List IAM groups
Show IAM groups in the account.
OpenIn sheetbashsame section
Add user to group
Attach an IAM user to a group.
OpenIn sheetbashsame section
Remove user from group
Detach a user from a group.
OpenIn sheetbashsame section