-
Couldn't load subscription status.
- Fork 220
Closed
Description
When I try to use a parallel task the Resource's aren't being resolved within the Parallel task's Branches key.
Example serverless configuration
stepFunctions:
createOrderStepFunc:
Comment: "Step function that creates a new order"
StartAt: FirstTask
States:
FirstTask:
Type: Task
Resource: firstTaskFunc
Next: GetReports
GetReports:
Type: Parallel
End: true
Branches:
-
StartAt: GetReport1
States:
GetReport1:
Type: Task
Resource: getReport1Func
End: true
-
StartAt: GetReport2
States:
GetReport2:
Type: Task
Resource: getReport2Func
End: true
When this step function gets deployed to AWS, the following code is generated:
{
"Comment": "Step function that creates a new order",
"StartAt": "FirstTask",
"States": {
"FirstTask": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-west-2:<id>:function:dev-firstTaskFunc",
"Next": "GetReports"
},
"GetReports": {
"Type": "Parallel",
"End": true,
"Branches": [{
"StartAt": "GetReport1",
"States": {
"GetReport1": {
"Type": "Task",
"Resource": "getReport1Func",
"End": true
}
}
}, {
"StartAt": "GetReport2",
"States": {
"GetReport2": {
"Type": "Task",
"Resource": "getReport2Func",
"End": true
}
}
}]
}
}
}
This step function does not work correctly, as the Resource entry within the nested States tag needs to be resolved for it to work.
horike37