1

stepfunctionscreenshot

The JSON in line 5 in the Parameters section of the screenshot uses JSONPath notation in AWS Step Functions. The key is "Values.$" and the value is a JSONPath that selects a string "$". However, I need to pass in a LIST not a STRING. The value that $ selects is a string.

If I put brackets around, it no longer recognizes that I'm using JSONPath notation and simply passes in the dollar sign character instead of gets the value from inputs.

How can I use JSONPath notation and pass in a string as a list?

spennybuns
  • 197
  • 2
  • 7
  • I'm not sure how `Values.$` or step function definitions work, but have you tried `$[*]`? `$` is just the start of a path. It returns the whole value. I expect adding `[*]` would get the items in an array. Can you show an example of what you're expecting? – gregsdennis May 31 '22 at 04:28
  • 2
    Does this answer your question? [How to use jsonPath inside array in AWS Step Functions](https://stackoverflow.com/questions/59167287/how-to-use-jsonpath-inside-array-in-aws-step-functions) – fedonev May 31 '22 at 07:01

1 Answers1

2

Should be able to use the States.Array Intrinsic Function since Parameters is a Payload Template

{
  "Filters": [{
    "Name": "replication-task-arn",
    "Values.$": "States.Array($)"
  }],
  "MaxRecords": 20,
  "WithoutSettings": true
}
deric4
  • 1,095
  • 7
  • 11