What a Cloud IoT Platform Provides

A cloud IoT platform connects millions of devices securely, ingests their data, stores and processes it, and sends commands back. Main services are device connectivity (MQTT, HTTPS, sometimes CoAP), device identity and security (certificates, keys, policies), device registry and management, a rules or routing engine, data storage and analytics, dashboards and APIs, and over-the-air (OTA) updates.

Platforms

  • AWS IoT Core: devices connect as "things" with an X.509 certificate and policy. The message broker uses MQTT topics; rules (written in SQL-like syntax) route data to services such as storage, databases, notifications or analytics; the device shadow keeps the last reported and desired state of a device, even when it is offline.
  • Azure IoT Hub: a managed hub that receives device-to-cloud messages (MQTT, AMQP, HTTPS) and sends cloud-to-device commands, using a device twin for state, with message routing to storage and stream analytics.
  • Google Cloud IoT: Google retired its IoT Core service in 2023, so new projects use partner platforms; the ideas remain the same.
  • ThingsBoard: an open-source platform that can be installed on one's own server or used in the cloud. It supports MQTT, CoAP and HTTP, device profiles, a rule engine, dashboards and alarms.

Ingestion and Processing Flow

  1. The device authenticates and publishes a JSON message to a topic.
  2. The broker receives it and a rule evaluates it (for example, temperature above 30).
  3. The rule stores the data, triggers an alert or calls a function.
  4. A dashboard shows the data; commands go back through the shadow or twin.

A batch path analyses stored data later; a stream path processes each message at once.

Definition: Device shadow (twin). A cloud copy of a device's state that stores the last reported values and the desired values, so that applications can read and set the state even when the device is offline.

Table 3.3: Cloud IoT platforms

Platform Key concepts Notable feature
AWS IoT Core Thing, certificate, policy, rule, shadow Deep link with AWS services
Azure IoT Hub Device identity, twin, message routing Strong enterprise integration
ThingsBoard Device profile, rule engine, dashboard Open source, self-hosted

Example 3.3: Messages and storage for a fleet

Problem: A fleet has 1,000 devices, each sending one 60-byte message per minute (assumed size). A rule raises an alert when temperature is above 30 °C; in one hour readings from a device are 28, 29, 31, 32, 30, 33. Find the messages and data per month (30 days) and the number of alerts in that hour for the device.

Solution:

  1. Messages per device per month = 60 × 24 × 30 = 43,200.
  2. Fleet messages = 1,000 × 43,200 = 4,32,00,000 (43.2 million).
  3. Data = 4,32,00,000 × 60 bytes = 2,59,20,00,000 bytes = 2.592 GB.
  4. Readings above 30: 31, 32 and 33, so 3 alerts (30 is not above 30).

Result: 43.2 million messages and about 2.6 GB per month, with 3 alerts for that device in the hour.

import json
n = 60 * 24 * 30
total = 1000 * n
print("Messages/month:", total, "| GB:", total * 60 / 1e9)
msg = {"id": "d1", "t": 31.5}
print(json.dumps(msg))
temps = [28, 29, 31, 32, 30, 33]
print("Alerts:", sum(1 for t in temps if t > 30))

Output

Messages/month: 43200000 | GB: 2.592
{"id": "d1", "t": 31.5}
Alerts: 3

Common mistakes

  • Hard-coding passwords instead of per-device certificates.
  • Leaving device policies too wide, such as access to all topics.
  • Ignoring message costs when the fleet becomes large.
  • Assuming a device is always online; use the shadow for state.

Key takeaways

  • Cloud IoT: connect, secure, ingest, store, analyse, command, update.
  • AWS: thing, certificate, policy, rule, shadow; Azure: twin, routing.
  • ThingsBoard is open source and can be self-hosted.
  • Rules turn messages into storage, alerts and actions.

Practice questions

  1. What is a device shadow?
  2. What is the role of a rule in a cloud IoT platform?
  3. Name an open-source IoT platform.

Answers to the practice questions

  1. A cloud copy of device state with reported and desired values, usable while the device is offline.
  2. It evaluates incoming messages and routes them to storage, alerts or functions.
  3. ThingsBoard.

Sources

  • Official BCA syllabus Internet of Things, course code 25BCA406DS01, Unit III