CmdID / aws / aws kinesis
aws kinesis put-records
Writes multiple data records into a Kinesis data stream in a single call (also referred to as a PutRecords request). AWS CLI reference
1 example 5 options Its page in the AWS CLI reference
Examples
To write multiple records into a data stream
The following put-records example writes a data record using the specified partition key and another data record using a different partition key in a single call. The --cli-binary-format raw-in-base64-out option passes the data as raw text instead of base64.
aws kinesis put-records --stream-name samplestream --cli-binary-format raw-in-base64-out --records Data=blob1,PartitionKey=partitionkey1 Data=blob2,PartitionKey=partitionkey2Identify--stream-nameThe stream name associated with the request.--cli-binary-formatThe formatting style to be used for binary blobs.--recordsThe records associated with the request.Its output
{
"FailedRecordCount": 0,
"Records": [
{
"SequenceNumber": "49600883331171471519674795588238531498465399900093808706",
"ShardId": "shardId-000000000004"
},
{
"SequenceNumber": "49600902273357540915989931256902715169698037101720764562",
"ShardId": "shardId-000000000009"
}
],
"EncryptionType": "KMS"
}For more information, see Developing Producers Using the Amazon Kinesis Data Streams API with the AWS SDK for Java in the Amazon Kinesis Data Streams Developer Guide.
Options
--dry-runChecks if your request will succeed.--recordsThe records associated with the request.--stream-arnThe ARN of the stream.--stream-idNot Implemented.--stream-nameThe stream name associated with the request.