I am trying to write some data to AWS Kinesis with the CLI, but this isn't working:
aws kinesis put-record --stream-name my-stream-name --data Data=jose|12
I am getting a "bash: 12: command not found" error.
aws kinesis put-record help
works so I don't understand the error.
I'm following this documentation.
Just wrap your data with single quotes:
--data 'Data=jose|12'
otherwise bash will try to pipe the output of aws kinesis put-record --stream-name my-stream-name --data Data=jose
to a program called 12
, which does not exist.
You will also need to add the --partition-key
argument, which you can randomly generate using --partition-key `uuidgen`
.
The whole command will be:
aws kinesis put-record --stream-name my-stream-name --data 'Data=jose|12' --partition-key `uuidgen`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With