IoT Cloud-Based Services: AWS IoT Core, Azure IoT Hub, and Device Twins
Why Does IoT Need the Cloud? (In Simple Words)
A small microcontroller (like an ESP32 or Arduino) costs just ₹300 to ₹400. It has very small RAM (barely 512 KB) and a slow processor.
It is great for reading a sensor or turning on a switch, but it cannot:
- Store months or years of sensor history.
- Run heavy AI/Machine Learning models to predict equipment breakdowns.
- Send instant notification alerts to 1,00,000 mobile app users at once.
IoT Cloud Platforms (like Amazon AWS, Microsoft Azure, and Google Cloud) provide the supercomputer power, unlimited storage, and security tools that make simple hardware devices truly “smart”.
1. Core Functions of an IoT Cloud Platform
Every modern IoT cloud platform provides four essential building blocks:
IF temperature > 50°C THEN send SMS alert).2. The Concept of Device Shadows (Device Twins)
What happens if a smart bulb in your house is unplugged or temporarily loses Wi-Fi, and you try to turn it OFF using your mobile phone while sitting in college?
In an old system, your mobile app would freeze, spin, and say “Device Unreachable”.
Modern IoT platforms fix this using Device Shadows (in AWS) or Device Twins (in Azure):
Reported State: {"light": "ON"}
Stores Reported & Desired States ➔
Sets Desired State: {"light": "OFF"}
How Device Twins Work:
- The cloud keeps a digital JSON document representing the physical device’s status.
- It tracks two important values:
- Reported State: The state last reported by the actual device (e.g.,
{"light": "ON"}). - Desired State: What the user wants the device to do (e.g.,
{"light": "OFF"}).
- Reported State: The state last reported by the actual device (e.g.,
- If the bulb is currently offline, your mobile app simply updates the Desired State in the cloud shadow immediately. The app doesn’t freeze!
- The moment the bulb reconnects to Wi-Fi, it automatically downloads the pending command from its cloud shadow, turns itself OFF, and updates its state to
{"light": "OFF"}.
3. Major Commercial IoT Cloud Platforms
A. Amazon AWS IoT Core
- Message Broker: Fast, secure MQTT broker supporting strong TLS encryption.
- Rules Engine: Easily routes sensor readings directly to other AWS services (e.g. saving data into DynamoDB, triggering AWS Lambda serverless code, or sending an SMS via Amazon SNS).
- AWS IoT Greengrass: Allows edge devices (like a Raspberry Pi) to run cloud code and machine learning locally, even when the Internet connection is down.
B. Microsoft Azure IoT Hub
- Bi-Directional Messaging: Secure two-way communication between millions of IoT nodes and Azure services.
- Azure IoT Edge: Runs Docker containers carrying AI models directly on local factory machines.
- Data Integration: Directly connects to Azure Stream Analytics, Power BI dashboards, and Cosmos DB.
C. Google Cloud IoT
- High-speed data ingestion directly into Google’s BigQuery analytics engine.
- Direct integration with Google Cloud AI and TensorFlow machine learning tools for predictive maintenance.
4. Comparison Table of Major IoT Cloud Platforms
| Feature | Amazon AWS IoT Core | Microsoft Azure IoT Hub | Google Cloud IoT |
|---|---|---|---|
| Main Protocols | MQTT, HTTPS, WebSockets | MQTT, AMQP, HTTPS, WebSockets | MQTT, HTTPS |
| Virtual Device Copy | Device Shadow | Device Twin | Device State / Config |
| Edge Computing Tool | AWS IoT Greengrass | Azure IoT Edge | Cloud Edge TPU |
| Connected Analytics | AWS Lambda, Kinesis, DynamoDB | Stream Analytics, Power BI, Cosmos DB | BigQuery, Cloud Functions |
| Device Security | X.509 digital certificates, IAM policies | Shared Access Signatures (SAS), X.509 | Public/Private key pairs |
💡 DAVV Exam Preparation Tips
5-Mark Question: “What is a Device Shadow (or Device Twin) in IoT cloud platforms? Why is it useful?”
- Definition: A Device Shadow is a cloud-based JSON file that stores the current state and desired state of an IoT device.
- Reported vs Desired: Explain that Reported State is what the device currently is, and Desired State is what the user wants it to be.
- Why Useful: Allows mobile apps to control devices smoothly even when the physical device is temporarily offline or disconnected from Wi-Fi.
10-Mark Question: “Explain the architecture and services provided by IoT Cloud Platforms. Detail the core components: Device Registry, Message Broker, Rules Engine, and Device Twins. Compare AWS IoT Core and Azure IoT Hub.”
- Explain why small microcontrollers need cloud platforms (storage, analytics, scale).
- Detail the 4 core components (Device Registry, Message Broker, Rules Engine, Device Shadow).
- Draw the Device Shadow flow diagram clearly.
- Draw the side-by-side comparison table between AWS IoT Core and Azure IoT Hub.