AWS Greengrass is an Internet of Things (IoT) open-source edge runtime and cloud service that helps you create, manage and maintain device software.
The most important part of AWS IoT Greengrass is Greengrass Core, located close to IoT devices on edge. It enables pre-processing of data from devices even when the Internet connection is slow or unstable.
Greengrass Core supports AWS Lambda functions that give the possibility to access local data, peripheral devices, ports, GPU, etc. As a result, Greengrass can gather and process data directly at the edge locations.
Such data processing enables:
decreased data traffic to the cloud;
working with a huge amount of devices even in places where the Internet is slow or unstable;
saving cloud computing resources
reacting to changes quickly avoid pre-analyzing them in the cloud.
You can see how it works in Image 7.
AWS Greengrass Core provides IoT apps (components) via AWS Lambda function, Docker containers, and your runtime, which helps with local data processing, ML inference, messaging, and data management and offers pre-built components to accelerate application development.
You can create a component or use public ones prebuilt by AWS.
At the same time, Greengrass Core can act as a gateway for IoT devices and helps them to interact even if they are not connected to the Internet.
Another aspect of Greengrass is the AWS IoT Greengrass cloud service that helps to build, deploy, and manage devices. It’s pre-integrated with many AWS services and can help your edge location interact with them.
Examples of AWS-provided public Greengrass components include:
AWS IoT Greengrass cloud service can help to orchestrate millions of devices. It can group them for maintenance, update, and configuration. Managing them is easy and could be done with a few buttons streaming instructions from Cloud to Edge.
Here are some examples of Greengrass usage:
The modern approach requires a massive amount of sensors, controllers of temperature, irrigation, and fertilizers.
At the same time, the remoteness of agricultural fields, the number of devices, and weak Internet connections create challenges for managing devices and quick response in case of new events, alerts, or changes.
Greengrass helps to solve these problems, even offline.
Сapturing from cameras can produce a high amount of data, and uploading everything for analysis into the cloud is expensive and time-consuming.
In some cases, it’s not even possible.
Instead, this video can be handled on edge, with only the result of it being uploaded into the cloud. Greengrass ML Inference feature makes it easy to perform machine learning inference locally.
Manufacturing involves a lot of machines, tools, and humans. Production comes with many challenges including spoilage and a great deal of waste if your tool is not working as expected.
This can be prevented with sensors, monitoring, and ML algorithms that send alerts about issues before they become a problem.
AWS has many success stories of implementing Greengrass and often shares the benefits of using it. Here are just a few examples.
Hydrographic robot developer saves about 4 hours of manual labor per device.
The deployment of a new code version takes up to an hour now instead of days or weeks. AWS with Greengrass helped to develop a simulation of devices that saved money and time since now this company could test software on simulation and not real devices.
At the same time, it helped to involve other companies in the research process.
As a result, this developer saves about $1,500 per device deployment.
A Japanese company has made a great contribution to smart farming.
Accurate water volume, temperature, fan speed, and fertilizer are important for proper plant growth.
To solve this challenge, the company decided to install cameras, get images, and check the number of leaves, height, state of plants, etc. This information is handled by trained ML models.
Such an approach produces a huge amount of data and handling it on edge via Greengrass can significantly increase the speed of decision-making and save money because of the network fees.
One of the best features of Greengrass is the continuous integration and continuous deployment of the code into Edge.
The typical cases are when a new version of the application has been released, and new devices have been added to the Greengrass client devices. Both cases are the triggers of the new code delivery.
Image 8 is an example (image credit: AWS) of how this could work.
In the example, you can see two paths of code deploying: CANARY and MAIN.
The canary pipeline could be used to test changes on test devices, while the main one is for deploying to production environments.
Here, we use CodeCommit as a version control system. When new code is pushed, it is taken by the canary pipeline and deployed into the test fleet.
If everything works correctly and the code is verified, it could be delivered to the production environment (main fleet).