Powers
Powers

Reputation: 19308

aws cli put-record for Kinesis

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.

Upvotes: 4

Views: 10141

Answers (1)

spg
spg

Reputation: 9837

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`

Upvotes: 8

Related Questions