HEX
Server: LiteSpeed
System: Linux s3604.bom1.stableserver.net 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: dmstechonline (1480)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/awscli/examples/qldb/stream-journal-to-kinesis.rst
**Example 1: To stream journal data to Kinesis Data Streams using input files**

The following ``stream-journal-to-kinesis`` example creates a stream of journal data within a specified date and time range from a ledger with the name ``myExampleLedger``. The stream sends the data to a specified Amazon Kinesis data stream. ::

    aws qldb stream-journal-to-kinesis \
        --ledger-name myExampleLedger \
        --inclusive-start-time 2020-05-29T00:00:00Z \
        --exclusive-end-time 2020-05-29T23:59:59Z \
        --role-arn arn:aws:iam::123456789012:role/my-kinesis-stream-role \
        --kinesis-configuration file://my-kinesis-config.json \
        --stream-name myExampleLedger-stream

Contents of ``my-kinesis-config.json``::

    {
        "StreamArn": "arn:aws:kinesis:us-east-1:123456789012:stream/stream-for-qldb",
        "AggregationEnabled": true
    }

Output::

    {
        "StreamId": "7ISCkqwe4y25YyHLzYUFAf"
    }

For more information, see `Streaming journal data from Amazon QLDB <https://docs.aws.amazon.com/qldb/latest/developerguide/streams.html>`__ in the *Amazon QLDB Developer Guide*.

**Example 2: To stream journal data to Kinesis Data Streams using shorthand syntax**

The following ``stream-journal-to-kinesis`` example creates a stream of journal data within a specified date and time range from a ledger with the name ``myExampleLedger``. The stream sends the data to a specified Amazon Kinesis data stream. ::

    aws qldb stream-journal-to-kinesis \
        --ledger-name myExampleLedger \
        --inclusive-start-time 2020-05-29T00:00:00Z \
        --exclusive-end-time 2020-05-29T23:59:59Z \
        --role-arn arn:aws:iam::123456789012:role/my-kinesis-stream-role \
        --stream-name myExampleLedger-stream \
        --kinesis-configuration StreamArn=arn:aws:kinesis:us-east-1:123456789012:stream/stream-for-qldb,AggregationEnabled=true

Output::

    {
        "StreamId": "7ISCkqwe4y25YyHLzYUFAf"
    }

For more information, see `Streaming journal data from Amazon QLDB <https://docs.aws.amazon.com/qldb/latest/developerguide/streams.html>`__ in the *Amazon QLDB Developer Guide*.