Differences between Amazon IoT Greengrass V1 and Amazon IoT Greengrass V2
Amazon IoT Greengrass V2 introduces new fundamental concepts for devices, fleets, and deployable software. This section describes the V1 concepts that are different in V2.
Concept | Amazon IoT Greengrass V1 | Amazon IoT Greengrass V2 |
---|---|---|
Application code |
In Amazon IoT Greengrass V1, Lambda functions define the software that runs on core devices. In each Greengrass group, you define subscriptions and local resources that the function uses. For Lambda functions that the Amazon IoT Greengrass Core software runs in a containerized Lambda runtime environment, you define container parameters, such as memory limits. |
In Amazon IoT Greengrass V2, components are the software modules that run on core devices.
You can import your V1 Lambda functions as components that run in a Lambda runtime environment in Amazon IoT Greengrass V2. When you import the Lambda function, you specify the subscriptions, local resources, and container parameters for the function. For more information, see Step 2: Create and deploy Amazon IoT Greengrass V2 components to migrate Amazon IoT Greengrass V1 applications. For more information about how to create custom components, see Develop Amazon IoT Greengrass components. |
Amazon IoT Greengrass groups and deployments |
In Amazon IoT Greengrass V1, a group defines the core device, the settings and software for that core device, and the list of Amazon IoT things that can connect to that core device. You create a deployment to send a group's configuration to a core device. |
In Amazon IoT Greengrass V2, you use deployments to define the software components and configurations that run on core devices.
For more information, see Deploy Amazon IoT Greengrass components to devices. In Amazon IoT Greengrass V2, you can also create local deployments using the Greengrass CLI to test custom software components on the device where you develop them. For more information, see Create Amazon IoT Greengrass components. |
Amazon IoT Greengrass Core software |
In Amazon IoT Greengrass V1, the Amazon IoT Greengrass Core software is a single package that contains the software and all of its features. The edge device on which you install the Amazon IoT Greengrass Core software is called a Greengrass core. |
In Amazon IoT Greengrass V2, the Amazon IoT Greengrass Core software is modular, so that you can choose what to install to control the memory footprint.
|
Connectors |
In Amazon IoT Greengrass V1, connectors are prebuilt modules that you deploy to Amazon IoT Greengrass V1 core devices to interact with local infrastructure, device protocols, Amazon, and other cloud services. |
In Amazon IoT Greengrass V2, Amazon provides Greengrass components that implement the functionality provided by connectors in V1. The following Amazon IoT Greengrass V2 components provide Greengrass V1 connector functionality: For more information, see Amazon-provided components. |
Connected devices (Greengrass devices) |
In Amazon IoT Greengrass V1, connected devices are Amazon IoT things that you add to a Greengrass group to connect to the core device in that group and communicate over MQTT. You must deploy that group each time that you add or remove a connected device. You use subscriptions to relay messages between connected devices, Amazon IoT Core, and applications on the core device. |
In Amazon IoT Greengrass V2, connected devices are called Greengrass client devices.
In both Amazon IoT Greengrass V1 and Amazon IoT Greengrass V2, 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. The Greengrass discovery API is backward compatible, so if you have client devices that connect to a V1 core device, you can connect them to a V2 core device without changing their code. For more information about client devices, see Interact with local IoT devices. |
Local resources |
In Amazon IoT Greengrass V1, Lambda functions that run in containers can be configured to access volumes and devices on the core device's file system. These file system resources are known as local resources. |
In Amazon IoT Greengrass V2, you can run components that are Lambda functions, Docker containers, or native operating system processes or custom runtimes.
|
Local shadow service |
In Amazon IoT Greengrass V1, the local shadow service is enabled by default, and supports only unnamed classic shadows. You use the Amazon IoT Greengrass Core SDK in your Lambda functions to interact with shadows on your devices. |
In Amazon IoT Greengrass V2, you enable the local shadow service by deploying the shadow manager component.
For more information, see Interact with device shadows. |
Subscriptions |
In Amazon IoT Greengrass V1, you define subscriptions for a Greengrass group to specify communication channels between Lambda functions, connectors, connected devices, the Amazon IoT Core MQTT broker, and the local shadow service. Subscriptions specify where Lambda functions receive event messages to consume as function payloads. |
In Amazon IoT Greengrass V2, you specify communication channels without using subscriptions.
|
Accessing other Amazon Web Services services |
In Amazon IoT Greengrass V1, you attach an Amazon Identity and Access Management (IAM) role, called the group role, to a Greengrass group. The group role defines the permissions that Lambda functions and Amazon IoT Greengrass features on that group's core device use to access Amazon Web Services services. |
In Amazon IoT Greengrass V2, you attach an Amazon IoT role alias to a Greengrass core device. The role alias points to an IAM role called the token exchange role. The token exchange role defines the permissions that Greengrass components on the core device use to access Amazon Web Services services. For more information, see Authorize core devices to interact with Amazon services. |