Created
November 7, 2022 22:07
-
-
Save anairinac/4047c3677d321360acc7190a25bb91e8 to your computer and use it in GitHub Desktop.
Get a list of AWS IAM Policies that have Glue permissions for all roles in account
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
roles=$(aws iam list-roles --query 'Roles[*].Arn' --output text) | |
for arn in $roles; do | |
echo filtering glue policies for arn $arn | |
policies=$(aws iam list-policies-granting-service-access --service-namespaces glue --arn=$arn --output text) | |
for policy in $policies; do | |
echo $policy | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment