Created
September 29, 2020 23:57
-
-
Save cam8001/5df6617543ce35d93b11210f35e6e327 to your computer and use it in GitHub Desktop.
Filter IAM roles showing trust relationship, conditions, and principal
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
aws iam list-roles | jq '.Roles | .[] | { role_name: .RoleName, action: .AssumeRolePolicyDocument.Statement | .[] | .Action, principal: .AssumeRolePolicyDocument.Statement | .[] | .Principal, condition: .AssumeRolePolicyDocument.Statement | .[] | .Condition }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment