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

수행할 수 있는 작업, 역할에 반대되는 정책, 해당 정책에 반대되는 작업을 어떻게 확인할 수 있나요?

감사해요

관련 정보