34  Cloud Platforms & Services

In 60 Seconds

Cloud platforms provide IoT solutions through layered service models (IaaS, PaaS, SaaS), each trading control for convenience. Major platforms like AWS IoT Core, Azure IoT Hub, and ClearBlade offer device registries, rule engines, and device shadow patterns that form the building blocks of scalable IoT cloud architectures.

34.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Compare Cloud Service Models: Distinguish between IaaS, PaaS, and SaaS and their IoT applications
  • Evaluate Cloud Platforms: Compare AWS IoT Core, Azure IoT Hub, and alternatives for specific requirements
  • Design Cloud Architectures: Create multi-tier cloud data pipelines for IoT applications
  • Understand Responsibility Models: Identify management responsibilities across different service models

Cloud data platforms provide ready-made building blocks for managing IoT data. Instead of building everything from scratch, you use pre-built services for storing, processing, and analyzing sensor data – like renting a fully equipped kitchen rather than constructing one yourself.

34.2 Prerequisites

Before diving into this chapter, you should be familiar with:

34.3 Cloud Computing Overview

⏱️ ~10 min | ⭐ Foundational | 📋 P10.C03.U02

Cloud service models diagram showing IaaS, PaaS, and SaaS layers for IoT data pipeline with data flowing from devices through infrastructure to applications
Figure 34.1: Cloud Service Models IaaS PaaS SaaS for IoT Data Pipeline

The Cloud is a way of provisioning services to clients, providing shared resources for organizations:

Service Models:

  • IaaS (Infrastructure as a Service): Virtual machines, storage, networks
  • PaaS (Platform as a Service): Development platforms and tools
  • SaaS (Software as a Service): Complete applications

Advantages:

  • Lower computer and software costs
  • Instant software updates
  • Unlimited storage capacity
  • Device independence
  • Economies of scale

Disadvantages:

  • Requires constant Internet connection
  • Needs high-speed Internet
  • Security concerns with data storage
  • Potential latency in connections

34.4 Cloud Service Model Stack

Architecture diagram showing cloud stack layered components and layers
Figure 34.2: Vertical layered stack showing how cloud service models build upon each other. Edge devices feed into IaaS infrastructure, which powers PaaS development platforms, ultimately delivering SaaS applications.

This sequence diagram shows the temporal flow of data from IoT device through edge to cloud:

Sequence diagram showing temporal flow of IoT data from edge device through gateway to cloud services with progressive data reduction at each tier

This view emphasizes how data volume is progressively reduced at each tier, with the cloud receiving pre-processed summaries rather than raw sensor streams.

34.5 Cloud Responsibility Matrix

Cloud services diagram showing cloud service responsibility
Figure 34.3: Cloud Responsibility Matrix: Who manages what in each service model

Cloud computing service models diagram showing three layers: IaaS (Infrastructure as a Service) at the bottom with Virtual Machine, Virtual Storage, and Virtual Grid components; PaaS (Platform as a Service) in the middle with security, integration, workflow, UI services, database grid, and application grid components; and SaaS (Software as a Service) at the top supporting multiple applications.

Cloud service models architecture showing the layered relationship between IaaS (Infrastructure), PaaS (Platform), and SaaS (Software) with their respective components and interfaces

This diagram illustrates the cloud computing stack showing how IaaS provides virtualized infrastructure (compute, storage, network), PaaS adds development platforms and services on top, and SaaS delivers complete applications to end users.

34.6 IoT Cloud Platform Comparison

Comparison diagram showing cloud iot platform compare
Figure 34.4: IoT Cloud Platform Comparison: AWS vs Azure vs ClearBlade decision guide

Note (2025): Google Cloud IoT Core was discontinued in August 2023. Google recommends ClearBlade as the migration path. AWS IoT Core and Azure IoT Hub remain the dominant cloud IoT platforms.

Comparison table of major cloud IoT platforms showing AWS IoT Core, Azure IoT Hub, and Google Cloud IoT Core with their key features, pricing models, integration capabilities, and use case strengths
Figure 34.5: Cloud service providers comparison

34.7 Cloud Architecture Patterns

IoT cloud architectures follow common patterns that appear across all major platforms. These patterns solve recurring challenges: how to connect devices, process data streams, and deliver insights to applications.

End-to-end IoT cloud workflow showing devices transmitting sensor data through gateways to cloud ingestion services, passing through data processing and storage layers, feeding analytics and machine learning models, and presenting results through user-facing applications
Figure 34.6: Using cloud for IoT data management

The complete IoT cloud architecture integrates multiple services to handle device connectivity, data ingestion, processing, storage, and application delivery.

Comprehensive IoT cloud architecture showing device layer with sensors and gateways, connectivity layer with MQTT and HTTP protocols, ingestion layer with message queuing, processing layer with stream and batch engines, storage layer with data lakes and warehouses, and application layer with dashboards and APIs
Figure 34.7: Complete IoT cloud architecture from devices to applications

Three key building blocks appear in every cloud IoT platform:

Rule Engine – A rule engine evaluates incoming telemetry against user-defined conditions and triggers automated actions. For example, “if temperature > 80C, send alert and throttle device.” This enables event-driven automation without custom application code.

IoT rule engine architecture showing incoming event stream processed by rule matching engine with condition evaluation, action triggering for alerts/notifications/device commands, and rule management interface for defining complex event patterns
Figure 34.8: IoT rule engine for event-driven automation

Device Shadow – A device shadow (AWS) or device twin (Azure) is a cloud-side JSON document that stores the last known state of each device. When a device goes offline, applications can still read its shadow. When the device reconnects, it synchronizes with any desired-state changes queued while it was away.

Device shadow synchronization diagram showing physical device state, cloud shadow representation, desired vs reported state comparison, and bidirectional synchronization protocol handling offline device updates and command queuing
Figure 34.9: Device shadow pattern for reliable cloud-device synchronization

Device Registry – The device registry maintains an authoritative record of every device’s identity, security credentials, and configuration state. It enables fleet-wide management operations such as firmware updates, access revocation, and group provisioning.

IoT device registry diagram showing a hierarchical database of registered devices with their identities, security certificates, configuration states, and connection status, enabling fleet-wide device management and monitoring
Figure 34.10: Device registry services form the foundation of cloud IoT platforms, maintaining authoritative records of device identities, security credentials, and configuration state.

34.8 Worked Example: Platform Selection

Scenario: A logistics company wants to deploy GPS trackers on 10,000 delivery vehicles. Each tracker reports location, speed, and engine diagnostics every 30 seconds. The company needs to select a cloud platform and estimate monthly costs for the first year.

Given:

  • Fleet size: 10,000 vehicles
  • Reporting interval: Every 30 seconds (2 messages/minute per vehicle)
  • Payload size: 200 bytes per message (GPS + diagnostics)
  • Operating hours: 12 hours/day, 6 days/week
  • Retention requirement: 90 days of raw data, 2 years of aggregated data
  • Analytics: Real-time dashboards + daily route optimization reports
  • Existing infrastructure: Microsoft Azure Active Directory for employee auth

Solution:

Step 1: Calculate message volume

Messages per vehicle per day:

  • 12 hours × 60 minutes × 2 messages/min = 1,440 messages/vehicle/day

Total daily messages:

  • 10,000 vehicles × 1,440 = 14.4 million messages/day

Monthly messages (26 operating days):

  • 14.4M × 26 = 374.4 million messages/month

Step 2: Calculate data volume

Daily data volume:

  • 14.4M messages × 200 bytes = 2.88 GB/day

Monthly ingest:

  • 2.88 GB × 26 = 74.88 GB/month

Step 3: Compare cloud platform pricing

Service AWS IoT Core Azure IoT Hub
Message pricing $1.00/million msgs (pay-per-use) S3 tier: $3,000/mo for 300M msgs included
Overage rate Same rate applies $0.80/million additional msgs
Monthly msg cost 374.4 × $1.00 = $374 $3,000 + (74.4M × $0.80) = $3,060
Device registry Free (first 500K) Included in tier
Storage (hot) S3: $0.023/GB Blob: $0.018/GB
Integration benefit None Azure AD SSO included

Step 4: Evaluate platform fit

Criterion AWS IoT Core Azure IoT Hub Decision
IoT messaging cost $374/month $3,060/month (S3 tier) AWS wins on raw cost
Auth integration Requires Cognito setup Native Azure AD Azure wins
Analytics tools QuickSight ($250/mo) Power BI (included with M365) Azure wins
Total cost of ownership Higher integration effort Lower with existing Azure infra Azure wins overall

Step 5: Calculate total monthly cost (Azure)

Component Monthly Cost
IoT Hub (S3 tier, 300M msgs included) $3,000
Additional messages (74.4M x $0.80/M) $60
Blob Storage (hot tier, ~75 GB) $1.35
Stream Analytics (6 streaming units) $360
Azure Maps (route optimization) $450
Power BI Pro (5 analysts) $50
Total $3,921/month

Annual cost: $3,921 x 12 = $47,052/year Cost per vehicle: $47,052 / 10,000 = $4.71/vehicle/year

Result: Azure IoT Hub is the recommended platform. Although AWS IoT Core has lower raw messaging costs ($374/month vs $3,060/month), Azure wins on total cost of ownership because the company already uses Azure AD (no additional authentication setup), Power BI is included with existing Microsoft 365 licensing, and native integration reduces development and maintenance effort.

Key Insight: Cloud platform selection should prioritize existing infrastructure integration over raw messaging pricing. Include the full stack cost (messaging + storage + analytics + visualization + integration effort) rather than comparing IoT service pricing alone.

Fleet Tracking Platform Cost Breakdown: 10,000 vehicles reporting every 30 seconds over 12-hour operating days = \(10{,}000 \times 2 \text{ msg/min} \times 720\text{ min/day} = 14.4M \text{ messages/day}\). Monthly (26 operating days): \(14.4M \times 26 = 374.4M\) messages.

Azure IoT Hub: Base tier S3 (300M messages included) \(\$3{,}000/\text{month}\) + overage \((74.4\text{M} \times \$0.80/\text{M}) = \$59.52\). Storage \((74.88\text{ GB} \times \$0.018/\text{GB}) = \$1.35\). Stream Analytics (6 SU) \(\$360\). Total infrastructure: \(\approx\$3{,}421/\text{month}\).

Per-vehicle cost: \(\$3{,}421 / 10{,}000 = \$0.34/\text{vehicle/month}\) or \(\$4.10/\text{vehicle/year}\). Compare to cellular data alone: \(14.4M \times 200\text{ bytes} \times 26 = 74.88\text{ GB/month} \times \$8/\text{GB} = \$599/\text{month}\) (\(\$7{,}189/\text{year}\)).

ROI: Cloud platform (\(\$41{,}052/\text{year}\)) + cellular (\(\$7{,}189\)) = \(\$48{,}241\) total. Route optimization savings: 5% fuel reduction x 10,000 vehicles x \(\$5{,}000/\text{vehicle/year}\) fuel = \(\$2{,}500{,}000/\text{year}\). Net benefit: \(\$2{,}451{,}759/\text{year}\). Platform pays for itself in under 1 month.

34.8.1 IoT Fleet Cloud Cost Calculator

Use this calculator to estimate monthly cloud platform costs for your own IoT fleet. Adjust the parameters to see how fleet size, reporting frequency, and operating hours affect total cost.

34.9 Knowledge Check

Cloud platforms are like different playgrounds – each one has special equipment for different kinds of fun!

34.9.1 The Sensor Squad Adventure: Picking the Perfect Playground

Sammy the Sensor wanted to play in the cloud, but she needed to pick the right playground. Max the Microcontroller showed her three options.

“First, there’s the IaaS Playground,” Max said. “They give you sand, wood, and nails, and YOU build whatever you want. It takes work, but you can make anything!” Sammy thought this sounded like a lot of effort.

“Next is the PaaS Playground,” continued Max. “They’ve already built the swings and slides, and you just decide how to arrange them and play.” Lila the LED liked this one – less building, more playing!

“Finally, the SaaS Playground is completely ready to go – just walk in and start having fun!” said Max. “But you can’t change anything.”

Bella the Battery noticed something important: “Each playground also has special features for IoT!” She pointed out the Device Registry (a sign-in book where every sensor checks in), the Rule Engine (a referee who watches for special events and blows a whistle), and the Device Shadow (a magic mirror that remembers what each sensor said, even if the sensor falls asleep).

“The secret,” said Max, “is picking the playground that matches what you need. If you want total control, pick IaaS. If you want to get started fast, pick SaaS. And PaaS is the sweet spot in between!”

34.9.2 Key Words for Kids

Word What It Means
Device Registry A sign-in book that keeps track of every sensor connected to the cloud
Rule Engine A helper that watches data and triggers actions when something important happens
Device Shadow A cloud copy of a sensor’s last known state, even when the sensor is offline
Service Model How much of the system the cloud provider manages for you

34.10 Vendor Lock-In: The Hidden Cost of Cloud IoT Platforms

Cloud platform selection creates long-term dependencies that are expensive to reverse. Understanding lock-in vectors helps architects make defensible choices.

The five lock-in vectors for IoT cloud platforms:

Lock-In Vector AWS Example Azure Example Migration Cost
Device provisioning AWS IoT Core X.509 certificates Azure DPS enrollment groups Must re-provision every device in the field
Rule engine logic AWS IoT Rules (SQL-like syntax) Azure Stream Analytics (SQL-like query language) Complete rewrite of event processing
Device shadows AWS IoT Device Shadow (JSON) Azure IoT Hub device twins (JSON) Different APIs, state sync semantics differ
Proprietary services AWS Greengrass (edge runtime) Azure IoT Edge (Docker-based) Different container formats, SDK dependencies
Data format coupling Kinesis Data Streams (shards) Event Hubs (partitions) Different scaling models, consumer group semantics

Case study: Wistron NeWeb Corporation (2023 Google Cloud IoT Core shutdown)

When Google discontinued Cloud IoT Core in August 2023, Wistron NeWeb – a Taiwanese ODM managing 2+ million connected devices across automotive, networking, and IoT segments – faced a forced migration. Their experience illustrates lock-in costs:

  • Timeline: 12 months from announcement to shutdown (announced Aug 2022, shutdown Aug 2023)
  • Migration path: Google recommended ClearBlade as the official migration partner
  • Hidden costs discovered during migration:
    • Device certificates: 2.1 million X.509 certificates needed re-issuance (6 weeks of provisioning infrastructure work)
    • Rule engine: 340 Google Cloud IoT Core rules translated to ClearBlade’s edge computing model (different paradigm, not just syntax)
    • Firmware OTA: Devices in the field needed firmware updates to point to new MQTT endpoints, requiring a rolling update across 2.1 million devices over 4 months
    • Testing: Full regression of device-to-cloud telemetry paths (3 months)

Mitigation strategies:

  1. Abstract the MQTT layer: Use a thin client library that wraps platform-specific SDKs. Changing the underlying platform requires modifying only the wrapper, not every device’s firmware
  2. Store data in open formats: Use Apache Parquet or Delta Lake rather than proprietary storage formats. Your historical data survives a platform migration
  3. Avoid proprietary edge runtimes: Docker containers run on any edge platform. AWS Greengrass Lambda functions do not
  4. Negotiate exit clauses: Include data export SLAs and migration support in enterprise contracts before signing

Common Pitfalls

A cloud platform (AWS, Azure, GCP) provides infrastructure; a cloud IoT service (AWS IoT Core, Azure IoT Hub) provides managed IoT-specific capabilities. Choosing a cloud platform without evaluating its IoT services portfolio leads to gaps filled with expensive custom development.

Not all cloud IoT services are available in every region. A deployment requiring data residency in a specific country must verify that the chosen platform’s IoT services are available in that region before committing to the architecture.

Cloud platforms offer generous free tiers for prototyping that do not reflect production costs. Message limits, storage caps, and connection limits in free tiers can mask the true cost implications of an architecture until it is too late to change.

Regulatory requirements or business continuity needs may force hybrid cloud or multi-cloud architectures later. Design device communication and data formats to be cloud-agnostic from the start even if deploying to a single cloud initially.

34.11 Summary

Key Concepts
  • Cloud Service Models: IaaS (infrastructure control), PaaS (managed platforms), SaaS (complete applications) offering different management-control trade-offs
  • Platform Selection: AWS IoT Core for maximum scale, Azure IoT Hub for Microsoft integration, ClearBlade for edge-first design
  • Responsibility Matrix: Each service model shifts management burden from customer to provider at the cost of control
  • Architecture Patterns: Device registry, rule engines, device shadows enable scalable IoT cloud solutions

34.12 What’s Next

If you want to… Read this
Explore specific cloud IoT platforms and services Cloud Data Platforms and Services
Understand the IoT cloud reference model Cloud Data IoT Reference Model
Explore architecture patterns for cloud deployments Cloud Data Architecture Gallery
Learn about data quality and security Cloud Data Quality and Security
Return to the module overview Big Data Overview