Reputation: 2615
I want to assign a variable from one of the state in AWS Step functions.
The value of this variable has to be dynamic. I tried various syntax (as suggested in AWS documentation) to achieve this. These are shared below.
"Assign": {
"index": "$states.input.index", // read inputs from states variable
"test": "This works fine"
}
Or
"Assign": {
"index.$": "$.input.index", // state gets input object in this structure
"test": "This works fine"
}
Or
"Assign": {
"index": "{% $states.input.index %}", // JSONat format
"test": "This works fine"
}
None of them seem to work and I end up getting string literal value for the dynamic expression instead of its evaluated value. Can someone help with what am I missing here?
Upvotes: 0
Views: 20