Created
March 19, 2021 14:29
-
-
Save matschaffer/8965e392791cf02498acce0e8d5c28c6 to your computer and use it in GitHub Desktop.
Shows all role and user policies - Helpful for deprecation of AWSElasticBeanstalkService
This file contains 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
for R in $(aws iam list-roles --query 'Roles[].RoleName[]' --output text); do | |
echo "$R" | |
aws iam list-attached-role-policies --role-name "$R" | |
done | |
for U in $(aws iam list-users --query 'Users[].UserName[]' --output text); do | |
echo "$U" | |
aws iam list-attached-user-policies --user-name "$U" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment