How to supply content of the file containing json to aws kinesis put-record?
I'd tried aws kinesis put-record --stream-name test_event --partition-key 1 --cli-input-json < file.json
but got argument --cli-input-json: expected one argument
CodePudding user response:
Answer
Use
--cli-input-json file://file.json
instead of
--cli-input-json < file.json
Update - Sharing valid sample json for the command aws kinesis put-record
{
"StreamName": "",
"Data": null,
"PartitionKey": "",
"ExplicitHashKey": "",
"SequenceNumberForOrdering": ""
}
The same can be obtained via aws kinesis put-record --generate-cli-skeleton