0

I have two Step Functions, where one (Step Function 1) triggers the other (Step Function 2).

The first Step Function has as input:

{
    "ClusterId": "j-AAAAAAA",
    "CreateCluster": false,
    "TerminateCluster": false,
}

My goal is to take the variable ClusterId and pass it Step Function 2. This is how did it:

        "TRIGGER STEP FUNCTION 2": {
          "Type": "Task",
          "Resource": "arn:aws:states:::states:startExecution.sync",
          "Parameters": {
            "StateMachineArn": "arn:aws:states:us-east-1:312312312312123:stateMachine:STEP FUNCTION 2",
            "Input": {
              "ClusterId": "$.ClusterId",
              }
            }
          }

However, the StepFunction 2 input becomes:

{
    "ClusterId": "$.ClusterId",
}

And NOT:

{
    "ClusterId": "j-AAAAAAA",
}

Does anyone know how I can pass the value of ClusterId to StepFunction 2?

Appreciate the help

1 Answer 1

1

Just figured it out. Instead of:

{
    "ClusterId": "$.ClusterId",
}

It should have been:

{
    "ClusterId.$": "$.ClusterId",
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.