AWS IoT Greengrass
An IoT runtime that executes local processing, machine learning inference, and messaging on edge devices while seamlessly integrating with the cloud
Overview
AWS IoT Greengrass is an IoT runtime that enables local execution of AWS Lambda functions, containers, and machine learning models on edge devices. Devices continue operating autonomously even in environments with unreliable network connectivity, synchronizing data with the cloud when connectivity is restored. Greengrass V2 adopts a component-based architecture, managing software delivery to devices at the individual component level. It comprehensively provides edge computing capabilities including ML inference components that deploy SageMaker-trained models to the edge for inference, and IPC functionality that mediates local Pub/Sub messaging between devices.
Component-Based Architecture and Deployment Management
The core of Greengrass V2 is its component-based software management model. Each function (log collection, ML inference, protocol conversion, etc.) is packaged as an independent component that can be individually deployed, updated, and rolled back on devices. Component recipes (YAML/JSON) declaratively define lifecycle scripts, dependencies, and configuration parameters, with IoT Core's cloud deployment feature distributing them to target device groups. Dependency resolution is automatic - if Component A depends on Component B and B is not installed, it is automatically installed. Semantic versioning is used for version management, with major version bumps for incompatible changes to prevent impact on existing deployments. The Nucleus (core runtime) itself is managed as a component and can be upgraded via OTA.
Edge ML Inference and Stream Processing
Greengrass's ML inference components provide a mechanism to run SageMaker Neo-compiled models or TensorFlow Lite models on edge devices. This eliminates cloud round-trips for use cases requiring low latency - camera-based object detection, vibration sensor anomaly detection, and audio keyword spotting. The Stream Manager component buffers inference results and sensor data locally, exporting to the cloud with priority-based scheduling according to available bandwidth. Export destinations include Kinesis Data Streams, IoT Analytics, and S3, with data retained in local storage during network outages. Edge AI books (Amazon) cover edge inference design patterns.
Security Design and Large-Scale Fleet Operations
Greengrass device security is built on mutual TLS authentication with X.509 certificates. For device provisioning, Fleet Provisioning is used to burn provisional certificates on the manufacturing line, with production certificates automatically issued on first connection - a flow suited for large-scale deployment. Local inter-component communication uses IPC (Inter-Process Communication), with authorization policies restricting accessible topics and resources per component. For fleet operations at tens of thousands of devices, devices are classified into thing groups with staged deployments (10% โ 50% โ 100%) to control risk. Deployment health is monitored via IoT Device Defender metrics, with a recommended design that triggers automatic rollback upon anomaly detection. The Nucleus memory footprint is approximately 35MB, enabling stable operation even on Raspberry Pi-class devices.