当我尝试根据状态机定义创建状态机时,出现以下错误:
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 https://docs.aws.amazon.com/step-functions/latest/dg/procedure-create-iam-role.html。它需要拥有创建什么样的托管规则的权限?
原因是CloudWatch完全访问附于的政策SFN_ROLEStep Functions 工作流没有足够的权限将事件发布到 CloudWatch。一旦我把它替换为CloudWatchEventsFullAccess一切正常。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)