【发布时间】:2020-01-19 23:20:36
【问题描述】:
当我尝试根据我的状态机定义创建状态机时出现以下错误:
botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the CreateStateMachine operation: 'role' is not authorized to create managed-rule.
创建代码:
state_machine = sfn_client.create_state_machine(
name = 'state-machine',
definition = state_machine_def,
roleArn = SFN_ROLE,
)
我使用的 IAM 角色包含所有必要的权限,如 here 所述。它需要什么样的托管规则才能拥有创建权限?
【问题讨论】:
-
那么您是否对角色应用了策略?您可以分享附加到该角色的 IAM 策略吗?
-
我的角色附加了以下策略:AWSLambdaRole CloudWatchFullAccess + 允许完全 AWS 批处理/ECR 访问以及传递角色的自定义策略
标签: amazon-web-services boto3 aws-step-functions