【发布时间】:2020-07-10 21:19:48
【问题描述】:
我想尝试新的 AWS Step Functions 功能,通过 startExecution.sync:2 启动嵌套的 Step Function,这应该与 startExecution.sync 完全相同,但将结果返回为 json-object 而不是序列化字符串。
当我想使用 CloudFormation 部署 Step Functions 时,我收到错误“' is not authorized to create managed-rule. (Service: AWSStepFunctions; Status Code: 400; Error Code: AccessDeniedException; Request ID: ... ; 代理:null)"
这个错误只发生在新的 startExecution.sync:2 中,startExecution.sync 可以完美运行。
我的 Inline-IAM-Statement 是
iamRoleStatements:
# Event to start SF synchronous
- Effect: Allow
Action:
- events:PutTargets
- events:PutRule
- events:DescribeRule
- events:DeleteRule
- events:DisableRule
- events:EnableRule
- events:ListRules
Resource:
- arn:aws:events:eu-central-1:<MY_AWS_ACCOUNT_ID>:rule/StepFunctionsGetEventsForStepFunctionsExecutionRule
- Effect: Allow
Action:
- states:StartExecution
Resource:
- <arn of other sf>
- Effect: Allow
Action:
- states:DescribeExecution
- states:StopExecution
Resource:
- "*"
任务启动其他功能的代码是
callOcrSf:
Type: Task
Resource: "arn:aws:states:::states:startExecution.sync:2"
Parameters:
StateMachineArn: <arn of other sf>
Input.$: "$"
ResultPath: "$.otherResult"
Next: nextTask
有谁知道,为什么这不起作用?我正在使用无服务器框架进行部署,但我认为这应该没什么区别,因为它只会创建 CloudFormation 堆栈。
【问题讨论】:
标签: amazon-web-services serverless-framework aws-step-functions