Amazon AWS CLI: ロールに割り当てられているアクション/権限/ポリシーを確認するにはどうすればよいですか?

Amazon AWS CLI: ロールに割り当てられているアクション/権限/ポリシーを確認するにはどうすればよいですか?

私は Linux を使用しており、AWS CLI を使用しています。

以下を実行してみました:

  • 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

しかし、それぞれが次のように返答します。

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

自分が実行できるアクション、そのロールに違反するポリシー、そのポリシーに違反するアクションを確認するにはどうすればよいでしょうか?

ありがとう

関連情報