Reputation: 21
In serverless.yml, I am using AWS step function... and one of the state is Wait where I am trying to use the output from other state... but the generated CFT puts \" around the variable and so the deploy of that state engine is failing. How to handle this ? I get below error:
Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: Expected value of type Integer at /States/WaitTill/Seconds
Tried putting a hard coded integer value and it works fine. sls version is 1.38.0
State from serverless.yml file
WaitTill:
Type: Wait
Seconds: $.Result.seconds_to_wait
Next: ProcessAhead
Here is the converted CFT json
\"WaitTill\": {\n \"Type\": \"Wait\",\n \"Seconds\": \"$.Result.seconds_to_wait\"
Upvotes: 2
Views: 1369
Reputation: 21
To use a variable, you need to use field "SecondsPath" instead of "Seconds". It works the same way as Result vs ResultPath.
Upvotes: 2