gpt4 book ai didi

amazon-web-services - 创建EMR集群时出错,EMR服务角色无效

转载 作者:行者123 更新时间:2023-12-03 07:42:49 25 4
gpt4 key购买 nike

我正在通过 cloudformation 和 lambda 函数创建 emr 集群。创建堆栈后,当我运行 lambda 函数时,它会通过给出 EMR 服务角色:无效错误来启动集群。附上我的服务角色和工作流程角色的代码。这是我缺少的权限或我应该授予的权限,以便我的 emr 开始执行这些步骤。

EMRClusterServiceRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- ec2.amazonaws.com
Action:
- 'sts:AssumeRole'
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role
Path: /

EMRClusterinstanceProfileRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- ec2.amazonaws.com
Action:
- 'sts:AssumeRole'
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role
Path: /

EMRClusterinstanceProfile:
Type: AWS::IAM::InstanceProfile
Properties:
Path: /
Roles:
- !Ref EMRClusterinstanceProfileRole

EMRJobFlowProfileinstance:
Type: AWS::IAM::InstanceProfile
Properties:
Path: /
Roles:
- !Ref EMRJobFlowRole


EMRJobFlowRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- ec2.amazonaws.com
Action:
- 'sts:AssumeRole'
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role
Path: /

最佳答案

根据评论,解决方案是使用 elasticmapreduce.amazonaws.com 信任策略原则。

关于amazon-web-services - 创建EMR集群时出错,EMR服务角色无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61742039/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com