Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Data Streams
    • All guides
    • Managing data streams
      • Creating a stream
      • Getting stream information
      • Sending data to a stream
      • Reading data from a stream
      • Deleting a stream
  • Access management
  • Pricing policy
  • FAQ
  1. Step-by-step guides
  2. Working with the AWS CLI
  3. Sending data to a stream

Sending data to a stream in the AWS CLI

Written by
Yandex Cloud
Updated at May 13, 2024

Note

You can create a trigger that will launch a function in Cloud Functions or a container in Serverless Containers when data is sent to the stream. Read more about triggers for Data Streams.

CLI

To send data to a stream, run the command:

aws kinesis put-record \
  --endpoint <endpoint> \
  --stream-name <stream_ID> \
  --cli-binary-format <binary_format> \
  --data <message> \
  --partition-key <partition_key>

Where:

  • --endpoint: Specify the https://yds.serverless.yandexcloud.net endpoint to send data to a stream over the AWS Kinesis Data Streams protocol.

  • --stream-name: Consists of the availability zone, folder ID, Yandex Managed Service for YDB database ID, and stream name.

    For example, your stream ID will appear as /ru-central1/aoeu1kuk2dht********/cc8029jgtuab********/aws_stream if:

    • aws_stream: Stream name
    • ru-central1: Region
    • aoeu1kuk2dht********: Folder ID
    • cc8029jgtuab********: YDB database ID
  • --cli-binary-format: Binary object format.

  • --data: Transmitted data.

  • --partition-key: Shard in the stream where the data is sent.

Command example:

aws kinesis put-record \
  --endpoint https://yds.serverless.yandexcloud.net \
  --stream-name /ru-central1/aoeu1kuk2dht********/cc8029jgtuab********/aws_stream \
  --cli-binary-format raw-in-base64-out \
  --data '{"user_id":"user1", "score": 100}' \
  --partition-key 1

Result example:

{
  "ShardId": "shard-000001",
  "SequenceNumber": "5851",
  "EncryptionType": "NONE"
}

Was the article helpful?

Previous
Getting stream information
Next
Reading data from a stream
Yandex project
© 2025 Yandex.Cloud LLC