In AWS Step Functions, we can use parameters from previous steps as inputs using the following syntax.
"Parameters": {
"Details": {
"weight.$": "$.product.weight",
"unit": "grams"
}
}
As an example, say product.weight.
is 500
. Can I configure a parameter that will receive a value of 500 grams
?
For example, something like this:
"Parameters": {
"Details": {
"formatted_weight.$": "{$.product.weight} grams",
}
}
Use the States.Format
intrinsic function to interpolate a string:
"Parameters": {
"Details": {
"formatted_weight.$": "States.Format('{} grams', $.product.weight)",
}
}