'using jo with aws invoke lambda command line

Normally, to test my aws lambda functions, Id do this:

IMG_FILE='/some/image/loc//img.jpg' &&\
jo img=%"$IMG_FILE" | curl -X POST -H 'Content-Type: application/json' -d @- "$LAMBDA_HOST" >> output.bin

Id like to replicate the same with aws lambda invoke function like so:

IMG_FILE='/some/image/loc//img.jpg' &&\
jo img=%"$IMG_FILE" |aws lambda invoke --payload XXXXXX --function-name funky_func output.bin

How do I pass the jo output to the --payload param? :(



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source