How to view all the policies attached to an IAM group

Below is the command to view all the policies attached to an IAM group where TeamA is the name of the group.

aws iam list-attached-group-policies --group-name TeamA

See also  How to count Objects in an S3 bucket