func detachPolicyFromUser(conn *iam.IAM, user string, arn string) error { _, err := conn.DetachUserPolicy(&iam.DetachUserPolicyInput{ UserName: aws.String(user), PolicyArn: aws.String(arn), }) if err != nil { return err } return nil }
func detachPolicyFromUsers(conn *iam.IAM, users []*string, arn string) error { for _, u := range users { _, err := conn.DetachUserPolicy(&iam.DetachUserPolicyInput{ UserName: u, PolicyArn: aws.String(arn), }) if err != nil { return err } } return nil }