Building an End-to-End IoT Data Dashboard with AWS Services

we’ll guide you through the high-level steps to create an end-to-end IoT solution.

High-Level Steps

Here’s a brief overview of the steps we’ll cover:

  1. Create an AWS IoT Core Thing: We’ll start by creating an AWS IoT Core Thing that represents your IoT device (in this case, we’ll use a laptop for demonstration purposes).
  2. Generate and Send Data: We’ll run a sample Python application that sends data as MQTT messages to AWS IoT Core. This data represents CPU utilization.
  3. Set Up Amazon Timestream: We’ll create an Amazon Timestream database and table to store the incoming telemetry data.
  4. Configure IoT Core Rule: We’ll create an IoT Core rule that routes the data from IoT Core to the Timestream table.
  5. Visualize Data with Amazon Managed Grafana: We’ll set up an Amazon Managed Grafana dashboard to display the incoming data in real-time.

Let’s take a closer look at the end-to-end architecture and then dive into each step.

End-to-End Architecture

Here’s an overview of the architecture for our IoT solution:

IoT Architecture
  • We use a laptop as an IoT device, but this could be any device capable of generating data.
  • The IoT device sends CPU utilization telemetry data over a secure MQTT connection to AWS IoT Core.
  • AWS IoT Core handles device identity, connection, and routing.
  • The AWS IoT Core Rules Engine can route telemetry data to other AWS services, which is what we’ll set up.
  • For data storage, we’ll use Amazon Timestream, a fast, scalable, and serverless time series database service.
  • To visualize the data, we’ll use Amazon Managed Grafana, a fully managed service for Grafana dashboards.

Now, let’s dive into the details of each step.

Step 1: Create an AWS IoT Core Thing

We start by creating an AWS IoT Core “thing” and setting up the device connection. Here are the steps:

  • Ensure the device can reach AWS IoT Core.
  • Provide a name for the “thing.”
  • Choose the operating system and SDK language.
  • Download and run the connection kit provided by AWS IoT Core. This kit includes a Python sample application for our device.

With these steps, we have our IoT “thing” set up and are sending CPU utilization telemetry data.

Generating and Sending Data

  • The sample Python application will establish a secure MQTT connection to AWS IoT Core and start sending data. You can customize the message payload; in this case, we’re using CPU utilization telemetry in JSON format.

Deep dive about Data-ATS endpoint

Step 2: Set Up Amazon Timestream

Now, let’s create a database and table in Amazon Timestream to store the incoming telemetry data:

  • Create a Timestream database.
  • Define a table with retention settings.
  • Configure a time-based storage model for efficient data storage.

With the database and table in place, we can now route our telemetry data to Amazon Timestream.

Configuring IoT Core Rule

  1. Create an IoT Core Rule: In the IoT Core console, create a new rule. Define a SELECT statement to capture the entire payload from your MQTT topic.

  2. Specify Rule Actions: Configure a TimeStream action to route data to your TimeStream database and table.

  3. Define Permissions: Create a new role to allow the rule to write data to the TimeStream table.
  4. Set Error Handling: Configure an error action to handle any processing errors, such as publishing error details to a designated MQTT topic.

Step 3: Visualize Data with Amazon Managed Grafana

To create a visualization of our IoT data, we’ll use Amazon Managed Grafana:

  • Set up a data source in Amazon Managed Grafana for our Timestream table.
  • Create a new dashboard with a panel that visualizes the incoming data as a time series line graph.

With this dashboard, we can observe our live data generated by the IoT device in close to real time.

Conclusion

In just a few steps, we’ve created an end-to-end IoT solution. Our IoT “thing” sends data securely to AWS IoT Core, which routes it to Amazon Timestream for storage. Finally, we visualize the data in Amazon Managed Grafana. This solution provides real-time insights and can be expanded for various use cases.

If you’d like to follow along, all you need is a laptop (or any device with Python installed) and an AWS account. With these three AWS services, you can quickly build a powerful IoT data dashboard for your applications.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top