SkillSprout
Chapter 7 · Lesson 4
Beginner
5 min read

Internet of Things: IoT Core and Greengrass

Overview

The Internet of Things (IoT) is the idea of everyday devices - sensors, cameras, machines, thermostats - connecting to the internet and sending data. Handling millions of devices securely is hard, so AWS provides managed IoT services.

Imagine a huge farm with thousands of soil sensors. AWS IoT Core is the central switchboard that every sensor can call to report in and receive instructions. AWS IoT Greengrass is a local foreman at the barn: it can make decisions on the spot even if the internet connection to head office drops.

CLF-C02 lists both services, so you need to know what each does and the difference between cloud and edge processing.

Key Concepts

  • AWS IoT Core is a managed cloud platform that lets connected devices interact securely with cloud applications and other devices.
  • Devices communicate using lightweight protocols such as MQTT, HTTPS and WebSockets.
  • Device authentication uses X.509 certificates, and IoT policies control what each device may do.
  • The rules engine routes messages to services such as S3, DynamoDB, Lambda and Kinesis.
  • Device shadows store the last known state of a device so apps can read it even when the device is offline.
  • AWS IoT Greengrass extends AWS to the edge, running Lambda functions, containers and ML models on local devices.
  • Greengrass works with intermittent connectivity and syncs with the cloud when available.

Detailed Notes

IoT Core and Greengrass compared

AspectAWS IoT CoreAWS IoT Greengrass
RunsIn the AWS Region (cloud)On the device or gateway (edge)
PurposeConnect, secure and manage devices at scaleProcess data locally, even offline
ConnectivityNeeds internet to reach the RegionWorks with intermittent or no connectivity
Typical featuresMessage broker, rules engine, device registry, shadowsLocal Lambda, ML inference, stream manager, local messaging

How IoT Core works

  1. A device is registered as a thing with a certificate.
  2. It connects to an endpoint and publishes messages to topics using MQTT.
  3. The message broker delivers messages to subscribers.
  4. The rules engine evaluates SQL-like rules and forwards matching data to other AWS services.
  5. Applications use device shadows to read or set desired state.
sql
SELECT temperature, deviceId, timestamp()
FROM 'farm/sensors/+/telemetry'
WHERE temperature > 35

This rule selects overheating readings and could send them to a Lambda function that raises an SNS alert.

Key IoT Core capabilities

CapabilityDescription
Device RegistryInventory of devices and metadata
Device DefenderAudits and monitors device security
Device ManagementFleet organisation, remote updates
Device ShadowPersistent virtual copy of device state
Fleet IndexingSearch across devices

Why use edge processing with Greengrass

ReasonExample
Low latencyA factory robot stops in milliseconds without a cloud round trip
Offline operationA ship at sea keeps running analytics until it docks
Lower bandwidth costFilter and aggregate data locally and upload only results
PrivacyProcess camera footage locally and send only alerts

Greengrass runs on Linux or Windows devices and can deploy components remotely from the cloud, so you manage thousands of gateways centrally. It can run machine learning inference with models trained in SageMaker.

Security model

Each device gets its own certificate and a least-privilege IoT policy. Traffic uses TLS. Never embed shared passwords in firmware. Use IoT Device Defender to detect anomalies such as a device suddenly sending far more traffic than usual.

Pricing

IoT Core charges by messages, connectivity minutes and rules actions executed. Greengrass is priced per active device per month, with a free tier for small fleets.

ServiceRole in IoT designs
KinesisIngest streaming telemetry
S3Long-term storage of raw data
LambdaProcess messages
SageMakerTrain models that run on Greengrass
QuickSightDashboards of IoT data

Real World Example

A wind-farm operator installs vibration sensors on 2,000 turbines. Each turbine publishes readings to AWS IoT Core over MQTT with its own certificate. A rule sends abnormal readings to a Lambda function that opens a maintenance ticket, and all data lands in S3 for later analysis.

Because turbines sit offshore with unreliable links, a Greengrass gateway at each site runs a local ML model that shuts down a turbine instantly if a dangerous pattern appears, then uploads a summary to the cloud when the connection returns.

Architecture Diagram

IoT Core in the cloud, Greengrass at the edge
Architecture

Edge site

Sensors
Greengrasslocal processing
AWS Cloud
IoT Corebroker + rules
Lambda
S3
  1. 1Sensors send readings to the local Greengrass device.
  2. 2Greengrass processes critical data locally with low latency.
  3. 3Summaries and events are published to IoT Core using MQTT over TLS.
  4. 4The rules engine routes messages to Lambda for alerts.
  5. 5Raw data is stored in S3 for analytics.

Best Practices

  • ✓Give each device a unique certificate with a least-privilege IoT policy.
  • ✓Use Greengrass when latency or intermittent connectivity matters.
  • ✓Filter and aggregate at the edge to reduce data transfer cost.
  • ✓Use device shadows so apps can interact with offline devices.
  • ✓Monitor fleets with IoT Device Defender for anomalies.

Common Interview Questions

Exam Tips

CLF-C02 focus

  • "Connect and manage IoT devices in the cloud" = AWS IoT Core.
  • "Run Lambda or ML locally on devices" = AWS IoT Greengrass.
  • MQTT is the typical IoT protocol; remember it by name.
  • Edge scenarios with poor connectivity point to Greengrass, not just IoT Core.

Chapter quiz

Other In-Scope AWS Services · 10 questions

  1. 1.A company wants a cloud-based call centre where agents can handle calls and chats without buying telephony hardware. Which service fits?

  2. 2.A startup needs AWS credits, training and technical support during its first year. Which programme should it join?

  3. 3.A company wants AWS to monitor, patch and respond to incidents across its AWS accounts on its behalf. Which offering matches?

  4. 4.Which service automates the build and test phase of a release by compiling code and running unit tests?

  5. 5.A team has a distributed application with many microservices and needs to find which service is causing slow responses. Which service should they use?

  6. 6.Remote employees need a full persistent Windows desktop delivered from AWS and accessible from any device. Which service should be used?

  7. 7.A software vendor wants prospects to try a heavy desktop application in a browser without installing it. Which service is the BEST fit?

  8. 8.A mobile developer needs a managed GraphQL API with real-time updates that reads from DynamoDB. Which service should be chosen?

  9. 9.A manufacturer needs machines on a factory floor to keep running analytics locally when the internet connection drops. Which service enables this?

  10. 10.Which service is a managed message broker and device registry that lets millions of IoT devices connect securely using MQTT?

0 of 10 answered

Finished this lesson?

0 of 43 lessons done · 0% of the course