我想解决 Amazon EMR Serverless 中 AWS Identity and Access Management (IAM) 用户和角色的访问遭拒错误。
解决方法
根据您收到的错误消息,解决 EMR Serverless 中 IAM 用户或角色的访问遭拒错误。
您没有 EMR Serverless 的必要权限
当您的 IAM 用户或角色无权使用 EMR Serverless 时,您会收到一条类似于以下内容的错误消息:
“您没有 EMR Serverless 所需的权限。”
要解决此错误,请向您的 IAM 用户或角色授予使用 EMR Serverless 的权限。
用户无权对资源执行操作
当您的 IAM 用户或角色没有对资源执行特定操作所需的权限时,您会收到一条类似于以下内容的错误消息:
“用户 arn:aws:sts:example-region:example-aws-account:XXX/YYY 无权对资源 arn:aws:elasticmapreduce:example-region:example-AWS-account:example-resource/action 执行 example-resource:action 操作,因为没有基于身份的策略允许 example-resource:action 操作”
要解决此错误,请确定不允许的操作,然后将该操作添加到角色的策略中。
例如,在以下错误消息中,不允许执行 elasticmapreduce:CreateStudioPresignedUrl 操作:
“用户 arn:aws:sts::example-AWS-account:assumed-role/example-role/example-user 假设角色无权在 arn:aws:elasticmapreduce:
example-region:example-AWS-account:studio/es-xxx 资源上执行 elasticmapreduce:CreateStudioPresignedUrl 操作,因为没有任何基于身份的策略允许 elasticmapreduce:CreateStudioPresignedUrl action 操作”
相关信息
对 EMR Serverless 中的错误进行故障排除