You are viewing the documentation for AWS IoT Greengrass Version 1. AWS IoT Greengrass Version 2 is the latest major version of AWS IoT Greengrass. For more information about using AWS IoT Greengrass Version 2, see the AWS IoT Greengrass V2 Developer Guide.
What is AWS IoT Greengrass?
AWS IoT Greengrass is software that extends cloud capabilities to local devices. This enables devices to collect and analyze data closer to the source of information, react autonomously to local events, and communicate securely with each other on local networks. Local devices can also communicate securely with AWS IoT Core and export IoT data to the AWS Cloud. AWS IoT Greengrass developers can use AWS Lambda functions and prebuilt connectors to create serverless applications that are deployed to devices for local execution.
The following diagram shows the basic architecture of AWS IoT Greengrass.

AWS IoT Greengrass makes it possible for customers to build IoT devices and application logic. Specifically, AWS IoT Greengrass provides cloud-based management of application logic that runs on devices. Locally deployed Lambda functions and connectors are triggered by local events, messages from the cloud, or other sources.
In AWS IoT Greengrass, devices securely communicate on a local network and exchange messages with each other without having to connect to the cloud. AWS IoT Greengrass provides a local pub/sub message manager that can intelligently buffer messages if connectivity is lost so that inbound and outbound messages to the cloud are preserved.
AWS IoT Greengrass protects user data:
-
Through the secure authentication and authorization of devices.
-
Through secure connectivity in the local network.
-
Between local devices and the cloud.
Device security credentials function in a group until they are revoked, even if connectivity to the cloud is disrupted, so that the devices can continue to securely communicate locally.
AWS IoT Greengrass provides secure, over-the-air updates of Lambda functions.
AWS IoT Greengrass consists of:
-
Software distributions
-
AWS IoT Greengrass Core software
-
AWS IoT Greengrass Core SDK
-
-
Cloud service
-
AWS IoT Greengrass API
-
-
Features
-
Lambda runtime
-
Shadows implementation
-
Message manager
-
Group management
-
Discovery service
-
Over-the-air update agent
-
Stream manager
-
Local resource access
-
Local machine learning inference
-
Local secrets manager
-
Connectors with built-in integration with services, protocols, and software
-
AWS IoT Greengrass Core software
The AWS IoT Greengrass Core software provides the following functionality:
-
Deployment and the local running of connectors and Lambda functions.
-
Process data streams locally with automatic exports to the AWS Cloud.
-
MQTT messaging over the local network between devices, connectors, and Lambda functions using managed subscriptions.
-
MQTT messaging between AWS IoT and devices, connectors, and Lambda functions using managed subscriptions.
-
Secure connections between devices and the AWS Cloud using device authentication and authorization.
-
Local shadow synchronization of devices. Shadows can be configured to sync with the AWS Cloud.
-
Controlled access to local device and volume resources.
-
Deployment of cloud-trained machine learning models for running local inference.
-
Automatic IP address detection that enables devices to discover the Greengrass core device.
-
Central deployment of new or updated group configuration. After the configuration data is downloaded, the core device is restarted automatically.
-
Secure, over-the-air (OTA) software updates of user-defined Lambda functions.
-
Secure, encrypted storage of local secrets and controlled access by connectors and Lambda functions.
AWS IoT Greengrass core instances are configured through AWS IoT Greengrass APIs that create and update AWS IoT Greengrass group definitions stored in the cloud.
AWS IoT Greengrass Core software versions
AWS IoT Greengrass provides several options for installing the AWS IoT Greengrass
Core software, including
tar.gz download files, a quick start script, and apt
installations on
supported Debian platforms. For more information, see Install the AWS IoT Greengrass Core software.
The following tabs describe what's new and changed in AWS IoT Greengrass Core software versions.
AWS IoT Greengrass groups
A Greengrass group is a collection of settings and components, such as a Greengrass core, devices, and subscriptions. Groups are used to define a scope of interaction. For example, a group might represent one floor of a building, one truck, or an entire mining site. The following diagram shows the components that can make up a Greengrass group.

In the preceding diagram:
- A: Greengrass group definition
-
Information about group settings and components.
- B: Greengrass group settings
-
These include:
-
Greengrass group role.
-
Certificate authority and local connection configuration.
-
Greengrass core connectivity information.
-
Default Lambda runtime environment. For more information, see Setting default containerization for Lambda functions in a group.
-
CloudWatch and local logs configuration. For more information, see Monitoring with AWS IoT Greengrass logs.
-
- C: Greengrass core
-
The AWS IoT thing (device) that represents the Greengrass core. For more information, see Configure the AWS IoT Greengrass core.
- D: Lambda function definition
-
A list of Lambda functions that run locally on the core, with associated configuration data. For more information, see Run Lambda functions on the AWS IoT Greengrass core.
- E: Subscription definition
-
A list of subscriptions that enable communication using MQTT messages. A subscription defines:
-
A message source and message target. These can be devices, Lambda functions, connectors, AWS IoT Core, and the local shadow service.
-
A topic or subject that's used to filter messages.
For more information, see Managed subscriptions in the MQTT messaging workflow.
-
- F: Connector definition
-
A list of connectors that run locally on the core, with associated configuration data. For more information, see Integrate with services and protocols using Greengrass connectors.
- G: Device definition
-
A list of AWS IoT things (devices) that are members of the Greengrass group, with associated configuration data. For more information, see Devices in AWS IoT Greengrass.
- H: Resource definition
-
A list of local resources, machine learning resources, and secret resources on the Greengrass core, with associated configuration data. For more information, see Access local resources with Lambda functions and connectors, Perform machine learning inference, and Deploy secrets to the AWS IoT Greengrass core.
When deployed, the Greengrass group definition, Lambda functions, connectors, resources, and subscription table are copied to the core device. For more information, see Deploy AWS IoT Greengrass groups to an AWS IoT Greengrass core.
Devices in AWS IoT Greengrass
A Greengrass group can contain two types of AWS IoT device:
- Greengrass core
-
A Greengrass core is a device that runs the AWS IoT Greengrass Core software, which allows it to communicate directly with AWS IoT Core and the AWS IoT Greengrass service. A core has its own device certificate used for authenticating with AWS IoT Core. It has a device shadow and an entry in the AWS IoT Core registry. Greengrass cores run a local Lambda runtime, deployment agent, and IP address tracker that sends IP address information to the AWS IoT Greengrass service to allow Greengrass devices to automatically discover their group and core connection information. For more information, see Configure the AWS IoT Greengrass core.
Note A Greengrass group must contain exactly one core.
- Device connected to a Greengrass core
-
Connected devices (also called Greengrass devices) also have their own device certificate for AWS IoT Core authentication, a device shadow, and an entry in the AWS IoT Core registry. Greengrass devices can run FreeRTOS or use the AWS IoT Device SDK or AWS IoT Greengrass Discovery API to get discovery information used to connect and authenticate with the core in the same Greengrass group. To learn how to use the AWS IoT console to create and configure a device for AWS IoT Greengrass, see Module 4: Interacting with devices in an AWS IoT Greengrass group. Or, for examples that show you how to use the AWS CLI to create and configure a device for AWS IoT Greengrass, see create-device-definition in the AWS CLI Command Reference.
In a Greengrass group, you can create subscriptions that allow devices to communicate over MQTT with Lambda functions, connectors, and other devices in the group, and with AWS IoT Core or the local shadow service. MQTT messages are routed through the core. If the core device loses connectivity to the cloud, devices can continue to communicate over the local network. Devices can vary in size, from smaller microcontroller-based devices to large appliances. Currently, a Greengrass group can contain up to 2500 devices. A device can be a member of up to 10 groups.
Note OPC-UA is an information exchange standard for industrial communication. To implement support for OPC-UA on the Greengrass core, you can use the IoT SiteWise connector. The connector sends industrial device data from OPC-UA servers to asset properties in AWS IoT SiteWise.
The following table shows how these device types are related.

The AWS IoT Greengrass core device stores certificates in two locations:
-
Core device certificate in
/
. Typically, the core device certificate is namedgreengrass-root
/certs
(for example,hash
.cert.pem86c84488a5.cert.pem
). This certificate is used by the AWS IoT client for mutual authentication when the core connects to the AWS IoT Core and AWS IoT Greengrass services. -
MQTT server certificate in
/
. The MQTT server certificate is namedgreengrass-root
/ggc/var/state/serverserver.crt
. This certificate is used for mutual authentication between the local MQTT server (on the Greengrass core) and Greengrass devices.Note greengrass-root
represents the path where the AWS IoT Greengrass Core software is installed on your device. Typically, this is the/greengrass
directory.
SDKs
The following AWS-provided SDKs are used to work with AWS IoT Greengrass:
- AWS SDK
-
Use the AWS SDK to build applications that interact with any AWS service, including Amazon S3, Amazon DynamoDB, AWS IoT, AWS IoT Greengrass, and more. In the context of AWS IoT Greengrass, you can use the AWS SDK in deployed Lambda functions to make direct calls to any AWS service. For more information, see AWS SDKs.
Note The operations specific to Greengrass that are available in the AWS SDKs are also available in the AWS IoT Greengrass API and AWS CLI.
- AWS IoT Device SDK
-
The AWS IoT Device SDK helps devices connect to AWS IoT Core and AWS IoT Greengrass. For more information, see AWS IoT Device SDKs in the AWS IoT Developer Guide.
Devices can use any of the AWS IoT Device SDK v2 platforms to discover connectivity information for a Greengrass core. Connectivity information includes:
-
The IDs of the Greengrass groups that the device belongs to.
-
The IP addresses of the Greengrass core in each group. These are also called core endpoints.
-
The group CA certificate, which devices use for mutual authentication with the core. For more information, see Device connection workflow.
Note In v1 of the AWS IoT Device SDKs, only the C++ and Python platforms provide built-in discovery support.
-
- AWS IoT Greengrass Core SDK
-
The AWS IoT Greengrass Core SDK enables Lambda functions to interact with the Greengrass core, publish messages to AWS IoT, interact with the local shadow service, invoke other deployed Lambda functions, and access secret resources. This SDK is used by Lambda functions that run on an AWS IoT Greengrass core. For more information, see AWS IoT Greengrass Core SDK.
- AWS IoT Greengrass Machine Learning SDK
-
The AWS IoT Greengrass Machine Learning SDK enables Lambda functions to consume machine learning models that are deployed to the Greengrass core as machine learning resources. This SDK is used by Lambda functions that run on an AWS IoT Greengrass core and interact with a local inference service. For more information, see AWS IoT Greengrass Machine Learning SDK.
Supported platforms and requirements
The following tabs list supported platforms and requirements for the AWS IoT Greengrass Core software.
You can download the AWS IoT Greengrass Core software from the AWS IoT Greengrass Core Software downloads.
For information about AWS IoT Greengrass quotas (limits), see Service Quotas in the Amazon Web Services General Reference.
For pricing information, see AWS IoT Greengrass pricing
AWS IoT Greengrass downloads
You can use the following information to find and download software for use with AWS IoT Greengrass.
AWS IoT Greengrass Core software
The AWS IoT Greengrass Core software extends AWS functionality onto an AWS IoT Greengrass core device, making it possible for local devices to act locally on the data they generate.
By downloading this software, you agree to the
Greengrass Core Software License Agreement
For information about other options for installing the AWS IoT Greengrass Core software on your device, see Install the AWS IoT Greengrass Core software.
AWS IoT Greengrass snap software
AWS IoT Greengrass snap v1.11.0 enables you to run a limited version of AWS IoT Greengrass through convenient software packages, along with all necessary dependencies, in a containerized environment.
The AWS IoT Greengrass snap is available for AWS IoT Greengrass Core software v1.11.0 and later. Unsupported versions don't receive bug fixes or updates.
The AWS IoT Greengrass snap doesn't support connectors and machine learning (ML) inference.
For more information, see Run AWS IoT Greengrass in a snap.
AWS IoT Greengrass Docker software
AWS provides a Dockerfile and Docker images that make it easier for you to run AWS IoT Greengrass in a Docker container.
- Dockerfile
-
Dockerfiles contain source code for building custom AWS IoT Greengrass container images. Images can be modified to run on different platform architectures or to reduce the image size. For instructions, see the README file.
Download your target AWS IoT Greengrass Core software version.
- Docker image
-
Docker images have the AWS IoT Greengrass Core software and dependencies installed on Amazon Linux 2 (x86_64) and Alpine Linux (x86_64, Armv7l, or AArch64) base images. You can use prebuilt images to start experimenting with AWS IoT Greengrass.
Download a prebuilt image from Docker Hub
or Amazon Elastic Container Registry (Amazon ECR). Note For steps that describe how to download and run a prebuilt image from Amazon ECR, see Running AWS IoT Greengrass in a Docker container.
The
latest
tag represents the latest stable version of the AWS IoT Greengrass Core software and dependencies installed on the Amazon Linux 2 base image. To find tags for all available images, check the Tags page on Docker Hub.Note By default,
alpine-aarch64
andalpine-armv7l
images can run only on Arm-based hosts. To run these images on an x86 host, you can install QEMUand mount the QEMU libraries on the host. For example: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
AWS IoT Greengrass Core SDK
Lambda functions use the AWS IoT Greengrass Core SDK to interact with the AWS IoT Greengrass core locally. This allows deployed Lambda functions to:
-
Exchange MQTT messages with AWS IoT Core.
-
Exchange MQTT messages with connectors, devices, and other Lambda functions in the Greengrass group.
-
Interact with the local shadow service.
-
Invoke other local Lambda functions.
-
Access secret resources.
-
Interact with stream manager.
Download the AWS IoT Greengrass Core SDK for your language or platform from GitHub.
For more information, see AWS IoT Greengrass Core SDK.
Supported machine learning runtimes and libraries
To perform inference on a Greengrass core, you must install the machine learning runtime or library for your ML model type.
AWS IoT Greengrass supports the following ML model types. Use these links to find information about how to install the runtime or library for your model type and device platform.
Machine learning samples
AWS IoT Greengrass provides samples that you can use with supported ML runtimes and
libraries. These samples are released under the Greengrass Core Software License Agreement
AWS IoT Greengrass ML SDK software
The AWS IoT Greengrass Machine Learning SDK enables the Lambda functions you author to consume a local machine learning model and send data to the ML Feedback connector for uploading and publishing.
We want to hear from you
We welcome your feedback. To contact us, visit the AWS IoT Greengrass forum