Last active
December 5, 2023 09:44
-
-
Save dploeger/fbeea791c256659985d09534fee4362a to your computer and use it in GitHub Desktop.
Get all customer managed AWS policy documents (in Fish)
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
for POLICYARN in (aws iam list-policies --scope Local | jq -r .Policies[].Arn) | |
for POLICYVERSION in (aws iam list-policy-versions --policy-arn $POLICYARN | jq -r .Versions[].VersionId) | |
echo $POLICYARN/$POLICYVERSION | |
aws iam get-policy-version --policy-arn $POLICYARN --version-id $POLICYVERSION | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment