Created
May 26, 2016 17:02
-
-
Save JohnPreston/e5c6572992e68ee808cc0d2974aa1e43 to your computer and use it in GitHub Desktop.
Get all the policies of a group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for policy in `aws iam list-group-policies --group-name $GROUP_NAME --endpoint-url=$IAM_URL --region euca --output=text | awk '{print $2}'` ; do | |
aws iam get-group-policy --policy-name "$policy" --group-name $GROUP_NAME --endpoint-url=$IAM_URL --region euca > "$policy".json | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment