Skip to content

Instantly share code, notes, and snippets.

@ayosec
Created October 4, 2019 02:55
Show Gist options
  • Save ayosec/fbb3807889512fad627804c01ea57e56 to your computer and use it in GitHub Desktop.
Save ayosec/fbb3807889512fad627804c01ea57e56 to your computer and use it in GitHub Desktop.
#!/bin/bash
role="$1"
aws iam list-role-policies --role-name "$role" \
| jq -r '.PolicyNames[]' \
| sort \
| xargs -l1 aws iam get-role-policy --role-name "$role" --policy-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment