I'm on Linux and using the AWS CLI.

I tried running the following:

  • aws iam list-instance-profiles-for-role --role-name role-abc-123
  • aws iam get-role --role-name role-abc-123 --query 'Role.AssumeRolePolicyDocument.Statement[].Action[]'
  • aws iam list-attached-role-policies --role-name role-abc-123

However each one comes back with:

An error occurred (AccessDenied) when calling the XXX operation: User: YYY is not authorized to perform: XXX on resource: role ZZZ because no identity-based policy allows the XXX action

How would I see what actions I'm able to perform, what policy is against the role and which actions are against that policy?


  • 1
    You need permission to access IAM in order to get the policies attached.
    – palvarez
    Commented Feb 23, 2023 at 18:36


You must log in to answer this question.

Browse other questions tagged .