HEX
Server: Apache
System: Linux pdx1-shared-a2-09 6.6.116-grsec-jammy-dirty #1 SMP Sat Nov 8 00:02:42 UTC 2025 x86_64
User: dh_pvsc7i (5084578)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/awscli/examples/iotanalytics/sample-channel-data.rst
**To retrieve sample messages from a channel**

The following ``sample-channel-data`` example retrieves a sample of messages from the specified channel ingested during the specified timeframe. You can retrieve up to 10 messages. ::

    aws iotanalytics sample-channel-data \
        --channel-name mychannel

Output::

    {
        "payloads": [
            "eyAidGVtcGVyYXR1cmUiOiAyMCB9",
            "eyAiZm9vIjogImJhciIgfQ=="
        ]
    }

For more information, see `SampleChannelData <https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_SampleChannelData.html>`__ in the *AWS IoT Analytics API Reference*.