I need to expand InputPath of Step Functions state with a new property without changing the structure of the initial InputPath.
For instance, my InputPath looks like:
{
"key1": "value1",
"key2": "value2"
}
I need to add here a new pair of key/value and pass this to Lambda. Thus, what I want to have is:
{
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
But I haven't found the way how to implement this. What I was able to do is to change the structure of InputPath using Parameters:
"InputPath": "$",
"Parameters": {
"input.$": "$",
"newValue": "value3"
}
So I get JSON with the following structure:
{
"input": {
"key1": "value1",
"key2": "value2"
},
"key3": "value3"
}
It's not a big problem, but I wonder if there is a way to keep a flat structure of InputPath and not to add new attributes (like "input" in my example).
UPD: I'm aware that it can be implemented using Pass states, but state machine is going to become too massive then.