I'm currently making some tests using AWS step functions, despite its ease of use I am not able to correctly manage the input of the map state:
Here is the input provided:
{
"keep": "elementToKeep",
"my_array": [
"element0",
"element1",
"element2"
]
}
I' like to make the map state iterate over my_array
such that the inner state recives as input
{ "keep": "elementToKeep", "element": "element0" }
at the 1st iteration{ "keep": "elementToKeep", "element": "element1" }
at the 2nd iteration- and so on ...
Right now I am only able to provide "element0"
(at the 1st interaction) as input, not even being able to correctly format it with JSONSyntax.
Below I paste the State Machine JSON structure. I am more familiar with the workflow view, but any help is highly appreciated.
{
"StartAt": "Map",
"States": {
"Map": {
"Type": "Map",
"End": true,
"Iterator": {
"StartAt": "Pass",
"States": {
"Pass": {
"Type": "Pass",
"End": true
}
}
},
"ItemsPath": "$.my_array"
}
}
}