Home > Enterprise >  AWS SFN JSONpath works in dataflow but fails on deployment
AWS SFN JSONpath works in dataflow but fails on deployment

Time:12-20

I have such a JSON path in my task parameters section

  "foo.$": "$.MapResult[].Payload[].data"

I tested it in AWS console dataflow and it worked fine and returned list of values for "data" key from the Payload list as expected but when I tried to deploy it I got

The value for the field 'foo.$' must be a valid JSONPath or a valid intrinsic function call (at /States/...-Task/Parameters)

CodePudding user response:

OK, I sorted it out and it seems like a bug in StepFunctions probably but anyway.

Despite the fact that it worked in dataflow simulator and it's a valid JSONpath to make it work in StateMachine you need to add a wildcard into brackets so it should be like this

  "foo.$": "$.MapResult[*].Payload[*].data"
  • Related