Who can assume SuperAdmin role in AWS IAM?

jdowdy
jdowdy ✭✭✭✭✭
Is there a way to see who can assume roles in AWS IAM. For example - can User Joe assume Role SuperAdmin. Can we query that in J1?

Best Answer

  • AaronO
    AaronO ✭✭✭
    Answer ✓
    Per the AWS Integration docs, you might be able to leverage the TRUSTS relationship that exists between the  aws_iam_role and the aws_iam_user.
    The following should get you what you're looking for:
    FIND User as u THAT TRUSTS aws_iam_role as r
        WHERE r.name="SuperAdmin"
    Or if you want to map it back to the Person maybe the following:
    FIND Person as p that is User as u THAT TRUSTS aws_iam_role as r
        WHERE r.name="SuperAdmin"
    You should be able to get whichever properties you need from whichever entity by leveraging the aliases (ex. r, u, p in the examples above).

This Month's Leaders