Search code examples
aws-lambdaaws-step-functions

The TimestampPath parameter does not reference an input value


I have a lambda function that passes JSON to a step function. The JSON looks like this:

{
  "reminder": {
    "date": "2020-06-12T04:25:12.698Z",
    "to": "ilrein@hotmail.com",
    "from": "ilia.reingold@gmail.com",
    "subject": "hello world",
    "content": "lorem ipsum"
  }
}

My step function looks for $.reminder.date during one of its states:

enter image description here

As you can see, it has the relevant JSON input at the ExecuteOn state.

However, unexpectedly, it results an error attempting to read the variable:

enter image description here

What am I doing wrong?


Solution

  • From your picture, it seems your input to ExecuteOn is a JSON-deserizable string, not a JSON object. Hence, the StepFunction doesn't know how to get $.reminder.date from this string.

    You should make sure the upstream Lambda passes a JSON object to this StepFunction.