Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Filter IAM roles showing trust relationship, conditions, and principal
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