从主工作流程中触发并忘记内部工作流程
主工作流程的步骤功能代码
"<StepName>":{
"Type": "Task",
"Next":"<NextStepName>",
"Resource": "arn:aws:states:::states:startExecution",
"Parameters":{
"Input":{
"Comment": "Hello world!"
},
"StateMachineArn":"<InnerStepFunctionArn>"
}
},
主要工作流角色的 IAM 政策
启动执行策略
StepFunctions/Write/Start Execution
Resource:Inner Step Function
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "states:StartExecution",
"Resource": "<InnerStepFunctionARN>"
}
]
}
等待内部工作流执行完成
主工作流程的步骤功能代码
"<StepName>":{
"Type": "Task",
"Next":"<NextStepName>",
"Resource": "arn:aws:states:::states:startExecution.sync",
"Parameters":{
"Input":{
"Comment": "Hello world!"
},
"StateMachineArn":"<InnerStepFunctionArn>"
}
},
主要工作流角色的 IAM 政策
启动执行策略
StepFunctions/Write/Start Execution
Resource:Inner Step Function
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "states:StartExecution",
"Resource": "<InnerStepFunctionARN>"
}
]
}
活动政策
CloudWatchEvent Full Access
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CloudWatchEventsFullAccess",
"Effect": "Allow",
"Action": "events:*",
"Resource": "*"
},
{
"Sid": "IAMPassRoleForCloudWatchEvents",
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "arn:aws:iam::*:role/AWS_Events_Invoke_Targets"
}
]
}