AWS IoT Core Integration with Amazon Timestream

   Go back to the Task List

  [« 5: Create IoT Rule ]    [7: Check Timestream Data »]

6: Publish Messages from the Device

The device and AWS IoT Core use publish-subscribe based communication model using topics. In this task, you use MQTT client which is part of AWS IoT Core to publish messages to iot/dojoinbound topic and due to the IoT rule configuration, the message will be published to the Timestream database table.

  1. On the AWS IoT Core console, click on Test menu in the left to open MQTT client. Click on the Publish to a topic link.

    Inbound

  2. It moves to the publish topic part of the MQTT client, type in iot/dojoinbound as the topic name. Copy-Paste the message shown below and click on the Publish to topic button.

    {
      "temperature": 40,
      "vibration": 30,
      "pressure": 25
    }
    

    `

    Inbound

  3. The message is published to the AWS IoT Core. Repeat the steps to publish another message as shown below.

    {
      "temperature": 35,
      "vibration": 20,
      "pressure": 20
    }
    

    `

  4. Both messages got published. Due to IoT rule which is looking for the messages published to the topic iot/dojoinbound, the rule will pick the messages and route to the Timestream database table as configured in the rule action.

  5. Let’s check the data published in the Timestream database table.