AWS
AWS IoT monitoring architecture with Managed Grafana
On this page
- Devices talk to AWS IoT Core over MQTT with mutual TLS; an IoT rule decides what happens to each message.
- A small Lambda function normalises readings from different device types into one shape before storage.
- Managed Grafana reads the time-series store directly; users sign in through IAM Identity Center or SAML.
- Timestream for LiveAnalytics closed to new customers on 20 June 2025. New builds should choose another store.
An AWS IoT monitoring architecture has three jobs: get readings off the devices securely, store them in a form that is easy to query over time, and show people when something is going wrong. AWS published a compact version of this for watching the health of factory machines and sensors, built from AWS IoT Core, a Lambda function, Amazon Timestream and Amazon Managed Grafana. This post redraws it, explains each step, and flags one change since it was written that matters if you build it today.
The problem: many devices, one view of their health
A plant has machines and sensors from different makers, each reporting in its own format. Engineers want one dashboard showing temperature, vibration or battery level over time, and they want to know about a failing machine before production stops. Polling each device is fragile, and a general-purpose database struggles with millions of small, time-stamped readings.
The design
The diagram has an ingest lane and a viewing lane (open the diagram).
- Devices connect to AWS IoT Core, which provides mutual authentication and encryption end to end. In AWS's walkthrough, the AWS IoT Device Simulator stands in for real devices.
- An IoT rule matches messages on a topic and invokes a Lambda function as each reading arrives.
- The Lambda function normalises the payloads from different device types into one schema and writes them to the time-series database.
- Amazon Managed Grafana has the database configured as a data source and a ready-made device dashboard for near real-time views.
- People sign in through IAM Identity Center (which needs AWS Organizations) or SAML, and are given a role in the workspace.
AWS's sample runs ten simulated devices sending a reading every second for ten minutes, and the authors say the same design scales to thousands of devices.
Why each piece is there
- IoT Core rather than your own broker: device identity, certificates and the MQTT broker are managed, so you are not running a fleet of brokers in front of a fleet of devices.
- A rule, then Lambda: the rule keeps routing declarative; the function holds the one piece of real logic, mapping each maker's format to yours. If all your devices already send the same shape, you may not need the function.
- A time-series database: readings are written once and queried by time range, which is exactly what these databases are built for.
- Managed Grafana: operators get dashboards and alerting without you running Grafana servers.
Building it today: the Timestream change
AWS closed Amazon Timestream for LiveAnalytics, the engine the original post uses, to new customers from 20 June 2025. Existing workloads keep running. For new projects AWS recommends evaluating Amazon Timestream for InfluxDB, and Grafana can read InfluxDB too. In the diagram, the database box stays in the same place; only its label changes. That is the value of drawing the architecture rather than the product list.
Trade-offs, cost and security
- Per-message cost. IoT Core messaging, rule actions and Lambda are all charged per message. A device reporting every second costs sixty times one reporting every minute. Agree the reporting interval with the people who will read the dashboard.
- Batching at the edge. Where a gateway sits on site, sending readings in batches cuts message counts, at the price of a little delay.
- Device identity. One certificate per device, scoped by IoT policy to its own topics, means a stolen device cannot publish as another.
- Timestamps. Device clocks drift. Decide whether to trust the device's time or stamp readings on arrival, and record which.
- Dashboard access. Grafana roles decide who can edit dashboards and alerts. Most operators need to view only.
When not to use it
- You need decisions in milliseconds on the factory floor: act at the edge, and send summaries to the cloud.
- You need heavy analytics or machine learning across years of data: land the raw readings in S3 as well, and analyse there.
- A handful of devices on one site: a local broker and a single Grafana server may be simpler and cheaper.
How to draw it in archhy
- From the Services drawer (AWS pack), place an AWS Cloud and a Region, then two dotted boundaries from the Draw drawer: "Ingest and store" and "See and act".
- IoT Core, the IoT rule, Timestream, Managed Grafana and IAM Identity Center have no palette item of their own: place Generic Resources, each with a clear name; their official AWS icons are not in the palette.
- Put the devices outside the AWS Cloud, so the trust boundary is visible, and label their rail "MQTT over TLS, mutual authentication".
- Animate the ingest rails and make Grafana's query rail dashed: data flows one way, questions the other.
- Add an info box to the devices with the reporting interval and device count, then download an SVG from the File menu.
Related: clickstream analytics on AWS and an event-driven pipeline on AWS.
Frequently asked questions
How do IoT devices send data to AWS?
Usually over MQTT to AWS IoT Core, each device authenticating with its own certificate. IoT rules then route messages to other AWS services.
Can I still use Amazon Timestream for IoT data?
Timestream for LiveAnalytics closed to new customers on 20 June 2025. AWS recommends new customers evaluate Timestream for InfluxDB.
Do I need Lambda between IoT Core and the database?
Only if you need to transform the data, for example to normalise different device formats. Otherwise route the messages straight to storage.
How do users sign in to Amazon Managed Grafana?
Through IAM Identity Center or a SAML identity provider, with a role per user or group in the workspace.
based on Redrawn and discussed from Monitor IoT device health at scale with Amazon Managed Grafana by Erik Cordsen, Kishore Dhamodaran, Nayef Khan and Drew Renton (AWS Cloud Operations Blog, 13 October 2023), with the availability change from the Amazon Timestream developer guide. The diagram and commentary are archhy's own.


