What's the easiest way to access data outside the mapped array in a map state in a step function?

19 Views Asked by At

I have a map state in my step function whose input looks like this:

{
  "name": "foobar",
  "specs": [...]
}

When configuring the map state I set "ItemsPath": "$.specs" to run the function once for each element of "specs":

        "MyMap": {
            "Type": "Map",
            "Next": "FirstLambdaInMap",
            "ItemsPath": "$.specs",
            "Iterator": { ...

What's the simplest way for me to update the state machine description so that the "name": "foobar" setting will also be exposed to the lambda called in the map state? Do I just have to update the input format of my data?

0

There are 0 best solutions below