We recently announced that you can now benefit from the combined power of Ubuntu Core and AWS IoT Greengrass to bring the computation, storage, and AI capabilities of the cloud closer to the edge. AWS IoT Greengrass is an open source edge runtime and cloud service that extends Amazon Web Services (AWS) capabilities to physical devices. It means devices can act locally on data while still harnessing the cloud for management and analytics. This is essential for applications where latency can be critical, resilience is needed due to low or no network connectivity, or where privacy and data concerns are paramount.
Ubuntu Core is a flavor of Ubuntu that has been specially optimized for IoT and embedded systems. The combination of the Ubuntu Core and AWS IoT Greengrass is ideal for those looking for reduced latency, lower bandwidth, and more efficient data processing.
This tutorial helps you get started using an Ubuntu Core device as a platform to deploy an AWS Greengrass based demonstration of video inference. To follow along you will need two devices:
You will also need a webcam to capture images and an AWS account.
Both AWS and Ubuntu Core are available on a wide range of hardware platforms. However, this specific demo has been optimized for Intel – hence the device requirements.
This blog will begin with a brief explanation of the solution before providing an overview of the architecture, and then guide you through the following steps:
So, let’s get started.
The solution uses Greengrass Nucleus installed as a Snap package on Ubuntu Core. It uses the strict confinement for snap packages to help maintain the highest level of security control and isolation.
Installing and configuring the Greengrass snap package takes only a couple of minutes. The package enables easy connection of Greengrass to the AWS Greengrass Service in your AWS account, including creation of the necessary certificate and permissions needed for the device to function.
After installation and configuration, three Greengrass custom components are deployed to the device from AWS. These enable connection of a USB webcam for capturing local images. Using Computer Vision (CV) capabilities provided through Intel OpenVINO, these images can then be processed for object detection to create a high-performance power combination for local device inference.
The results of the CV inference are sent to AWS Cloud IoT Core service using MQTT, a standard protocol for IoT devices. The annotated images with bounding boxes for object detection are uploaded to Amazon S3 from the device. Together, these enable a web-based dashboard to visualize annotated images and inference results.
The diagram below shows the high-level view of the interaction of the different components that will be deployed to your device for the purposes of this demo.
The three components we will be deploying are:
The minimum requirements for edge devices running Ubuntu Core is available in our documentation. While Ubuntu Core is available for many architectures, this demo is targeted at Intel CPUs because it uses the Intel OpenVINO driver, and we will need:
We will also need:
First, we need to set up our Ubuntu Core device.
Ubuntu Core is a minimal, immutable flavor of Ubuntu which provides a reliable and secure platform for connected devices. To get started with it, Canonical have provided reference images that can be flashed onto certain devices and provide you a working environment.
Ubuntu Core’s immutability and automatic updates make it the perfect platform for an embedded IoT workloading, meaning the user won’t have to worry about the device breaking in the field.
Once we have flashed the Ubuntu Core image to our device, we will need to be able to connect to it. This will require an Ubuntu SSO account and an SSH keypair. You can skip this step if you already have an account, otherwise you can sign up for one here.
To authenticate yourself when trying to connect to your Ubuntu Core device, you will need to upload a public SSH key to your SSO account. This will then be automatically downloaded to the Core device during initial configuration and allow you to log into a console.
To generate and upload an SSH key pair, follow the steps detailed in our documentation: Connect to Ubuntu Core with SSH.
Now, we are ready to set up the device.
We will be booting the device into a live Ubuntu environment using the first of our two USB sticks. From this instance, we can then flash the device storage with the Ubuntu Core image that we copied onto the second USB memory stick.
Once in Ubuntu Desktop, insert your second USB stick and locate the Ubuntu Core image file. This will be something like:
/media/ubuntu//ubuntu-core-24-amd64.img.xz
Let’s decompress that file to give us a raw image:
unxz ubuntu-core-24-amd-64.img.xz Now, flash it to the device:
dd if=ubuntu-core-24-amd-64.img of=/dev/ bs=32M status=progress If you are not sure what your local target disk is, run sudo fdisk -l. This will list all your storage devices. You are looking for something like /dev/nvme01n1. Note, this will completely erase anything on your target device, and replace it with Ubuntu Core.
Once complete, you can remove all your USB sticks and reboot the device, which should start the Ubuntu Core initial configuration.
Follow this wizard process and configure your network connection. You will be prompted to enter your Ubuntu SSO credentials, which will automatically download your SSH Keys to the device.
Once configured, your device will be up and running. On screen, there will be a message explaining how to connect to this device from any other device on the network with a command such as:
ssh @
Congratulations. You now have a secure, robust Ubuntu Core device. Now, let’s give it some cloud-connected superpowers.
To create and deploy the AWS components for this demo, we need to create two IAM users with programmatic access (Access Key and Secret Access Key) for Greengrass installation.
To set up an IAM User:
The first user is for installing the Greengrass device – we’ll refer to them as the “Greengrass Device User” from now on. It is recommended to give this user AWSGreengrassFullAccess and AWSIoTFullAccess permissions – this is slightly more than is required, but will ensure the user has everything necessary to get started. A finer grained breakdown of AWS permissions used can be found in the component repository.
When creating this user, make sure you create and download the Access Keys as you will be prompted to enter them during the Greengrass installation.
The second user is needed to configure the deployment and resources – we’ll call them the “Deployment User” from now on. This user will require a few more permissions. This user should be granted the PowerUserAccess and IAMFullAccess policies in addition to the AWSIoTFullAccess and AWSGreengrassFullAccess policies.
Having created both the Greengrass Device User and the Deployment User we need to obtain their access key.
We will use the access keys during the following steps to configure the device and deployment.
The installation of Greengrass is simple and quick, following the steps below on your Ubuntu Core device.
sudo snap install aws-iot-greengrass
sudo aws-iot-greengrass.configure
sudo snap connect aws-iot-greengrass:docker docker:docker-daemon
sudo snap connect aws-iot-greengrass:docker-executables docker:docker-executables
sudo snap connect aws-iot-greengrass:camera Having created our device, we now will create some components and deploy them to the device. Let’s start by setting up the environment for this on your second Ubuntu device.
The components themselves and scripts to help make the installation process simple are available on GitHub. Start by cloning this repo to your local device:
sudo apt install git
git clone
https://github.com/aws-samples/sample-greengrass-ubuntucore-computervision Next, we will need to install and configure the AWS CLI. This will allow us to log in to AWS and perform all the necessary actions. The login command will prompt you for the Access Key and Secret Access Key created in the previous steps – in this case, use the ones for the Deployment User.
snap install aws-cli --classic
aws configure Now we are logged in, we can create our components. As mentioned, the component uses the Intel OpenVINO models for image analysis. These need downloading separately using the provided script in the repository:
sudo apt install curl zip
download_model.sh Finally, we’ll make sure we have all other dependencies installed and create a python virtual environment to keep everything together. From the local repository directory, run:
sudo apt install python3-venv
python3 -m venv greengrass-deploy
source greengrass-deploy/bin/activate
pip install -r requirements-deploy.txt Before we can deploy the components to the device, we will create an S3 bucket to store our images and a user account so we can access the web dashboard we will create.
This is all handled by the following script.
python3 setup_aws_resources.py --s3-bucket your-bucket-name --region us-east-1 The script will create:
As the web dashboard will be accessing our AWS resources, we will need to create a user for that purpose that allows for username/password authentication. The user will be demo@example.com and you will be prompted for the password you would like to use.
Note: The InferenceHandlerCore component uploads each processed image to the same S3 location (camera/latest-inference.jpg), overwriting the previous image. This keeps storage minimal and simplifies the dashboard.
And now, it is time to deploy components by simply running the script and follow the prompts:
python3 deploy_greengrass_components.py This will guide you through the process including:
Once the script has run, you should be able to see the status of your deployments and the components being delivered to your device.
If you need more information on the scripts, or debugging any issues, the repository contains a readme.md file with more details.
So, the deployment has completed and our device is happily running away doing its own thing on the edge. We want to see what it is up to, so let’s deploy a dashboard. The dashboard runs locally, connecting to AWS to display the most recent captured image alongside the inference model output.
The dashboard is provided with the component repository and more information on it can be found in the /react-web folder.
Scripts have been provided below to perform all the necessary setup steps.
The configuration for the dashboard, to ensure it connects to the correct locations, is stored in the .env file that is automatically populated when you run the deploy_greengrass_components script. If you need to recreate it, you can run the script again with the following settings:
python3 deploy_greengrass_components.py --stage setup --s3-bucket
your-bucket-name --region us-east-1 Having configured everything, install the dependencies necessary for the dashboard. From the react-web/ folder in the repository, run:
apt install npm
npm install Finally, start the dashboard server with:
npm start Open http://localhost:3000 to view the dashboard. Log in with the demo user credentials created in the previous stage and click “Connect” to see the S3 images. Click “Subscribe” to view the model output.
We hope that, having set up this demo, you get an insight into what you can do with AWS IoT Greengrass and Ubuntu Core. From here, you can further explore the options to build components, deploy, manage, and monitor remotely, as well as scaling up. In addition, Ubuntu Core will keep you secure and up to date automatically.
In future blogs, we will explore more specific Ubuntu Core management options directly from AWS Greengrass. Keep your eyes peeled!
What will you build next? A smart factory monitor? An automated sales kiosk? A robotic production line? Whatever it is, Ubuntu Core and AWS Greengrass have your back.
Whether you are a startup bringing your concept to market or already have large fleets of devices deployed in the field, we have the expertise and infrastructure to launch and support you. Contact our team here.
AWS’s open source edge run time meets Canonical’s fully containerized OS for devices delivering a…
This article provides a guide to deploy ScyllaDB on Ubuntu VPS. What is ScyllaDB? ScyllaDB…
This article demonstrates how to harden security of VPS server and is intended for server…
In this blog post, we will guide you on how to install wget on Ubuntu…
Jan 27,2026 Xfwl4 - The roadmap for a Xfce Wayland Compositor We, the Xfce team…
This article provides a step-by-step how-to guide to deploy n8n on Ubuntu VPS. What is…