Differences between AWS IoT Greengrass V1 and AWS IoT Greengrass V2
AWS 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 | AWS IoT Greengrass V1 | AWS IoT Greengrass V2 |
---|---|---|
Application code |
In AWS 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 AWS IoT Greengrass Core software runs in a containerized Lambda runtime environment, you define container parameters, such as memory limits. |
In AWS 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 AWS 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 AWS IoT Greengrass V2 components to migrate AWS IoT Greengrass V1 applications. For more information about how to create custom components, see Develop AWS IoT Greengrass components. |
AWS IoT Greengrass groups and deployments |
In AWS IoT Greengrass V1, a group defines the core device, the settings and software for that core device, and the list of AWS IoT things that can connect to that core device. You create a deployment to send a group's configuration to a core device. |
In AWS IoT Greengrass V2, you use deployments to define the software components and configurations that run on core devices.
For more information, see Deploy AWS IoT Greengrass components to devices. In AWS 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 AWS IoT Greengrass components. |
AWS IoT Greengrass Core software |
In AWS IoT Greengrass V1, the AWS 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 AWS IoT Greengrass Core software is called a Greengrass core. |
In AWS IoT Greengrass V2, the AWS IoT Greengrass Core software is modular, so that you can choose what to install to control the memory footprint.
|
Connectors |
In AWS IoT Greengrass V1, connectors are prebuilt modules that you deploy to AWS IoT Greengrass V1 core devices to interact with local infrastructure, device protocols, AWS, and other cloud services. |
In AWS IoT Greengrass V2, AWS provides Greengrass components that implement the functionality provided by connectors in V1. The following AWS IoT Greengrass V2 components provide Greengrass V1 connector functionality: For more information, see AWS-provided components. |
Connected devices (Greengrass devices) |
In AWS IoT Greengrass V1, connected devices are AWS 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, AWS IoT Core, and applications on the core device. |
In AWS IoT Greengrass V2, connected devices are called Greengrass client devices.
In both AWS IoT Greengrass V1 and AWS IoT Greengrass V2, devices can run FreeRTOS or use the AWS 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 AWS 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 AWS 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 AWS IoT Greengrass V1, the local shadow service is enabled by default, and supports only unnamed classic shadows. You use the AWS IoT Greengrass Core SDK in your Lambda functions to interact with shadows on your devices. |
In AWS 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 AWS IoT Greengrass V1, you define subscriptions for a Greengrass group to specify communication channels between Lambda functions, connectors, connected devices, the AWS IoT Core MQTT broker, and the local shadow service. Subscriptions specify where Lambda functions receive event messages to consume as function payloads. |
In AWS IoT Greengrass V2, you specify communication channels without using subscriptions.
|
Accessing other AWS services |
In AWS IoT Greengrass V1, you attach an AWS Identity and Access Management (IAM) role, called the group role, to a Greengrass group. The group role defines the permissions that Lambda functions and AWS IoT Greengrass features on that group's core device use to access AWS services. |
In AWS IoT Greengrass V2, you attach an AWS 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 AWS services. For more information, see Authorize core devices to interact with AWS services. |