Home > OS >  How to feed json from file to aws kinesis put-record
How to feed json from file to aws kinesis put-record

Time:07-14

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.jsonbut 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

  • Related