Fire and Forget the Inner Workflow from the Main Workflow
Step Function Code for the Main Workflow
"<StepName>":{
"Type": "Task",
"Next":"<NextStepName>",
"Resource": "arn:aws:states:::states:startExecution",
"Parameters":{
"Input":{
"Comment": "Hello world!"
},
"StateMachineArn":"<InnerStepFunctionArn>"
}
},
IAM Policy for the Main Workflow Role
Start Execution Policy
StepFunctions/Write/Start Execution
Resource:Inner Step Function
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "states:StartExecution",
"Resource": "<InnerStepFunctionARN>"
}
]
}
Wait for the Inner Workflow Execution to Finish
Step Function Code for the Main Workflow
"<StepName>":{
"Type": "Task",
"Next":"<NextStepName>",
"Resource": "arn:aws:states:::states:startExecution.sync",
"Parameters":{
"Input":{
"Comment": "Hello world!"
},
"StateMachineArn":"<InnerStepFunctionArn>"
}
},
IAM Policy for the Main Workflow Role
Start Execution Policy
StepFunctions/Write/Start Execution
Resource:Inner Step Function
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "states:StartExecution",
"Resource": "<InnerStepFunctionARN>"
}
]
}
Event Policy
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"
}
]
}