Greengrass is a software developed by Amazon Web Services (AWS) for the deployment of local compute, messaging, and data caching capabilities for Internet of Things (IoT) devices. This allows IoT devices to operate even when disconnected from the cloud and enables real-time local processing and the ability to respond quickly to events.
One common deployment scenario for Greengrass is using a small, low-power IoT device as the core device. These devices, such as the Raspberry Pi, can be configured to run Greengrass and connected to sensors and actuators. This allows for data to be collected and processed locally on the IoT device, and then securely sent to the cloud for further analysis and storage. This approach can be particularly useful in situations where a reliable internet connection may not be available or where low latency is crucial. In situations where more CPU power is needed, a more powerful device can be used as the IoT core. For example, a larger single-board computer like the NUC or Intel’s IoT gateway could be used, providing more processing power and storage capacity for more demanding workloads. Additionally, the ability to run AWS Lambda functions on the IoT device with Greengrass enables the execution of specific business logic on the device itself, reducing the need to constantly send data to the cloud.
Disclaimer: This tutorial is for people that know the basics of AWS and can read code.
What you need to follow this tutorial:
Also, grab a cup of coffee, you’ll need it. Go ahaid, I’ll wait for you.
There are plenty of tutorials on how to set up a Raspberry Pi, so I won’t go through this topic. If you need a tutorial, please read the official documentation, most tutorials are outdated on how to set up a pi:
Just make sure, it has SSH and access to the internet.
SSH onto your Raspberry and install the following software.
But first, let’s update our raspberry:
sudo apt update && sudo apt upgrade -y
sudo apt install default-jdk
check if Java is installed with:
you should get a version from this command, like this:
openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Raspbian-1deb11u1)
OpenJDK Server VM (build 11.0.16+8-post-Raspbian-1deb11u1, mixed mode)
Go to the AWS Management Console and head over to IAM. We need a User. Give that User programmatic access and make sure to save the Access and Private Key.
You’ll need the user just to pull the correct data during the Greengrass installation. When that is done, you can delete that user.
Again: it is important to grab the access and secret key, after creating the user.
Now that user needs the right permissions. Create a Policy with the following permissions: