Piping commands doesn't work

My command is this (I need to turn the output of aws into a 1-liner so that I can make it an output of the step. Multi-line outputs are not supported).:

aws amplify start-job --app-id xxx --branch-name master --job-type RELEASE | jq -c

I get usage instructions back from jq, meaning it didn’t receive the data. It works locally and I can see the output of the aws command without the pipe.

What might be the issue?

Hi @thisismydesign,

Based on the usage:
--compact-output / -c:
By default, jq pretty-prints JSON output. Using this option will result in more compact output by instead putting each JSON object on a single line.

What’s the output of the command without the pipe? Is it json format?
If it’s not, please try to use command | xargs instead, it will set the output to oneline.

aws amplify start-job --app-id xxx --branch-name master --job-type RELEASE | xargs

Thanks