How to list all the IAM groups of your AWS account

Below is the command to list all the IAM groups of your AWS account.

aws iam list-groups

Sample output of the list-groups command is as shown below. You’ll see group ARN, created time, group id and group name in the output.

GROUPS arn:aws:iam::123456789123:group/TeamA 2018-12-30T15:32:20Z GROUPIDABCDEFGHIJKL TeamA

To view the information of only one group, you can grep the group name from the above output. In my below example, TeamA is the group name.


aws iam list-groups | grep TeamA

See also  How to list all the tables of a schema in Redshift