How Amazon IoT Greengrass works
The Amazon IoT Greengrass client software, also called Amazon IoT Greengrass Core software, runs on Windows and Linux-based distributions, such as Ubuntu or Raspberry Pi OS, for devices with ARM or x86 architectures. With Amazon IoT Greengrass, you can program devices to act locally on the data they generate, run predictions based on machine learning models, and filter and aggregate device data. Amazon IoT Greengrass enables local execution of Amazon Lambda functions, Docker containers, native OS processes, or custom runtimes of your choice.
Amazon IoT Greengrass provides pre-built software modules called components that let you easily extend edge device functionality. Amazon IoT Greengrass components enable you to connect to Amazon services and third-party applications at the edge. After you develop your IoT applications, Amazon IoT Greengrass enables you to remotely deploy, configure, and manage those applications on your fleet of devices in the field.
The following example shows how an Amazon IoT Greengrass device interacts with the Amazon IoT Greengrass cloud service and other Amazon services in the Amazon Web Services Cloud.
Key concepts for Amazon IoT Greengrass
The following are essential concepts for understanding and using Amazon IoT Greengrass:
- Amazon IoT thing
-
An Amazon IoT thing is a representation of a specific device or logical entity. Information about a thing is stored in the Amazon IoT registry.
- Greengrass core device
-
A device that runs the Amazon IoT Greengrass Core software. A Greengrass core device is an Amazon IoT thing. You can add multiple core devices to Amazon IoT thing groups to create and manage groups of Greengrass core devices. For more information, see Setting up Amazon IoT Greengrass core devices.
- Greengrass client device
-
A device that connects to and communicates with a Greengrass core device over MQTT. A Greengrass client device is an Amazon IoT thing. The core device can process, filter, and aggregate data from client devices that connect to it. You can configure the core device to relay MQTT messages between client devices, the Amazon IoT Core cloud service, and Greengrass components. For more information, see Interact with local IoT devices.
Client devices can run FreeRTOS or use the Amazon IoT Device SDK or Greengrass discovery API to get information about core devices to which they can connect.
- Greengrass component
-
A software module that is deployed to and runs on a Greengrass core device. All software that is developed and deployed with Amazon IoT Greengrass is modeled as a component. Amazon IoT Greengrass provides pre-built public components that provide features and functionality that you can use in your applications. You can also develop your own custom components, on your local device or in the cloud. After you develop a custom component, you can use the Amazon IoT Greengrass cloud service to deploy it to single or multiple core devices. You can create a custom component and deploy that component to a core device. When you do, the core device downloads the following resources to run the component:
-
Recipe: A JSON or YAML file that describes the software module by defining component details, configuration, and parameters.
-
Artifact: The source code, binaries, or scripts that define the software that will run on your device. You can create artifacts from scratch, or you can create a component using a Lambda function, a Docker container, or a custom runtime.
-
Dependency: The relationship between components that enables you to enforce automatic updates or restarts of dependent components. For example, you can have a secure message processing component dependent on an encryption component. This ensures that any updates to the encryption component automatically update and restart the message processing component.
For more information, see Amazon-provided components and Develop Amazon IoT Greengrass components.
-
- Deployment
-
The process to send components and apply the desired component configuration to a destination target device, which can be a single Greengrass core device or a group of Greengrass core devices. Deployments automatically apply any updated component configurations to the target and include any other components that are defined as dependencies. You can also clone an existing deployment to create a new deployment that uses the same components but is deployed to a different target. Deployments are continuous, which means that any updates you make to the components or the component configuration of a deployment automatically get sent to all destination targets. For more information, see Deploy Amazon IoT Greengrass components to devices.
- Amazon IoT Greengrass Core software
-
As of version 2.14, Amazon IoT Greengrass provides two alternative implementations of its device runtime, an executable known as the nucleus. The first, and previously only, nucleus is implemented in Java. This choice provides the greatest portability across architectures and operating systems. However, it also comes with a dependency on the Java Virtual Machine, resulting in a large memory footprint.
The second, newly added nucleus is implemented in C. This choice considerably reduces its footprint. However, it requires distribution (or compilation from source) separately for different target architectures and operating systems. When there is a need to distinguish the two, we will refer to the first implementation as the nucleus classic and the latter as the nucleus lite.
-
Optional components: These configurable components are provided by Amazon IoT Greengrass and enable additional features on your edge devices. Depending on your requirements, you can choose the optional components that you want to deploy to your device, such as data streaming, local machine learning inference, or a local command line interface. For more information, see Amazon-provided components.
You can upgrade your Amazon IoT Greengrass Core software by deploying new versions of your components to your device.
-
Features of Amazon IoT Greengrass
Amazon IoT Greengrass Version 2 consists of the following elements:
-
Software distributions
-
The Greengrass nucleus component, which is the minimum installation of the Amazon IoT Greengrass Core software. This component manages deployments, orchestration, and lifecycle management of Greengrass components.
-
Additional optional Amazon-provided components that integrate with services, protocols, and software.
-
Greengrass development tools, which you can use to create, test, build, publish, and deploy custom Greengrass components.
-
The Amazon IoT Device SDK, which contains the interprocess communication (IPC) library for custom Greengrass components and the Greengrass discovery library for client devices.
-
The Stream Manager SDK, which you can use to manage data streams on core devices.
-
-
Cloud service
-
Amazon IoT Greengrass V2 API
-
Amazon IoT Greengrass V2 console
-
Amazon IoT Greengrass Core software
You can use the Amazon IoT Greengrass Core software that runs on your edge devices to do the following:
-
Process data streams on the local device with automatic exports to the Amazon Cloud. For more information, see Manage data streams on Greengrass core devices.
-
Support MQTT messaging between Amazon IoT and components. For more information, see Publish/subscribe Amazon IoT Core MQTT messages.
-
Interact with local devices that connect and communicate over MQTT. For more information, see Interact with local IoT devices.
-
Support local publish and subscribe messaging between components. For more information, see Publish/subscribe local messages.
-
Deploy and invoke components and Lambda functions. For more information, see Deploy Amazon IoT Greengrass components to devices.
-
Manage component lifecycles, such as with support for install and run scripts. For more information, see Amazon IoT Greengrass component recipe reference.
-
Perform secure, over-the-air (OTA) software updates of the Amazon IoT Greengrass Core software and custom components. For more information, see Update the Amazon IoT Greengrass Core software (OTA) and Deploy Amazon IoT Greengrass components to devices.
-
Provide secure, encrypted storage of local secrets and controlled access by components. For more information, see Secret manager.
-
Secure connections between devices and the Amazon Cloud with device authentication and authorization. For more information, see Device authentication and authorization for Amazon IoT Greengrass.
You configure and manage Greengrass core devices through Amazon IoT Greengrass APIs where you create continuous software deployments. For more information, see Deploy Amazon IoT Greengrass components to devices.
Some features are supported on only certain platforms. For more information, see Greengrass feature compatibility by operating system.
For more information about supported platforms, requirements, and downloads, see Setting up Amazon IoT Greengrass core devices.
By downloading this software, you agree to the Greengrass Core Software License Agreement