![Forrest logo](/images/logo.png)
aws-kinesis:tldr:d4727
This command is using the AWS Command Line Interface (CLI) to put a record into an Amazon Kinesis data stream.
Here is a breakdown of the command and its components:
-
aws kinesis put-record
: This is the basic syntax to invoke the AWS CLI command for putting a record into an Amazon Kinesis data stream. -
--stream-name ${name}
: This option specifies the name of the target Kinesis data stream where the record will be published. The value for${name}
would be replaced with the actual name of the stream. -
--partition-key ${key}
: This option specifies the partition key to use for the record. The partition key is used to determine which shard in the data stream the record will go to. The value for${key}
would be replaced with the actual partition key. -
--data "$( echo "${my raw message}" | base64 )"
: This option specifies the data of the record to be published. The value for${my raw message}
would be replaced with the actual raw message to be encoded and published to the Kinesis data stream. The commandecho "${my raw message}"
is used to retrieve the raw message, and| base64
is used to encode the message in base64 format for the purpose of transferring it over the network.
Overall, this command is used to publish a record with the specified partition key and encoded data to the given Amazon Kinesis data stream using the AWS CLI.