How to attach policy to an IAM group

Use the below command to attach a policy to an IAM group where TeamA is the group name and ‘arn:aws:iam::123456789123:policy/POLICYNAME’ is the policy arn.

aws iam attach-group-policy --group-name TeamA --policy-arn arn:aws:iam::123456789123:policy/POLICYNAME

See also  How to create an IAM User