Skip to content

Parallel tasks do not have their arn identifiers resolved #5

@arthurdelight4

Description

@arthurdelight4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions