AWS CLI, using `--cli-input-json` in a pipeline

I went digging... It looks like aws will read the indicated file twice, using the second dataset for it's operation. Of course, in a pipeline, the second read() will get nothing.

I've added a pipe:// prefix/schema (commit) for use in this situation which will cache the value... I've also made a pull request.


Found a workaround for the time being with xargs that is quite clean:

cat ./mytask.json \
    | xargs -0 aws ecs register-task-definition --cli-input-json

It only adds xargs -0 and requires --cli-input-json to be the last argument