Deploy ML models to Arm edge devices using Edge Impulse and AWS IoT Greengrass
Introduction
Understand the Edge Impulse and AWS IoT Greengrass deployment architecture
Select and set up your edge device
Set up your Edge Impulse project
Install AWS IoT Greengrass on your Arm edge device
Store your Edge Impulse API key in AWS Secrets Manager
Create the Edge Impulse Greengrass component
Deploy the component to your edge device
Verify inference and view results
Next Steps
Deploy ML models to Arm edge devices using Edge Impulse and AWS IoT Greengrass
Introduction
Understand the Edge Impulse and AWS IoT Greengrass deployment architecture
Select and set up your edge device
Set up your Edge Impulse project
Install AWS IoT Greengrass on your Arm edge device
Store your Edge Impulse API key in AWS Secrets Manager
Create the Edge Impulse Greengrass component
Deploy the component to your edge device
Verify inference and view results
Next Steps
Create a Greengrass deployment
Create a Greengrass deployment that downloads, installs, and runs the Edge Impulse Linux Runner service on your edge device. When the Edge Impulse Linux Runner starts, it connects to your Edge Impulse project using the API key stored in AWS Secrets Manager. The runner then downloads your trained ML model and begins running inference.
If your edge device doesn’t have a camera, for example an EC2 instance, deploy the additional custom Greengrass component before you start the deployment.
Before continuing, follow the non-camera additional component setup steps .
During deployment, select both the additional component and the Edge Impulse Linux Runner component.
Open the AWS Console and navigate to AWS IoT Core > Greengrass > Deployments. You can either create a new deployment or modify an existing one.
You have two deployment target options.
To deploy to a group of devices, select a thing group:
Deploy to a group of devices
To deploy to a specific device (for example, your EC2 edge device), select a single core device:
Deploy to a single device
After choosing your target, complete the following steps:
Select Next.
On the components page, select your EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent custom component:
Select the custom componentNote If your edge device doesn’t have a camera, also select the EdgeImpulseEdge Impulse Linux RunnerRuntimeInstallerComponent that you created while completing non-camera component setup:
Select both components for non-camera devicesSelect Next again.
Select the EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent and select Configure component to customize the component for your device:
Configure the component
If you also have the non-camera component, it doesn’t need configuration. Configure only the EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent.
Apply the device-specific configuration
The component has a default configuration from the recipe, but you can override the configuration for this specific deployment. Use the device-specific JSON that you saved during hardware setup.
To apply the device-specific configuration:
Clear the Configuration to merge text box, paste the JSON that you saved from edge device hardware setup, and select Confirm:
Paste the device-specific configurationThe ability to customize the configuration per deployment is one of the key benefits of Greengrass components. You can deploy the same component to different devices while adjusting settings such as
device_nameorgst_argsfor each target’s specific hardware.Continue selecting Next through the remaining pages until you reach the review page.
Select Deploy:
Review and deploy
Monitor the deployment
The deployment can take several minutes depending on network speed. The component downloads and installs all prerequisites such as Node.js, libvips, and the Edge Impulse CLI before starting the Edge Impulse Linux Runner.
To monitor progress, SSH into your edge device and tail the component logs:
sudo tail -f /greengrass/v2/logs/EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent.log
The log shows the installation activity during the component setup phase. After the install completes, the Edge Impulse Linux Runner writes its own log file.
To watch running inference output, run:
sudo tail -f /tmp/ei*log
Both log files are essential for debugging deployment or configuration issues. If the deployment fails, check the component log first for installation errors.
What you’ve accomplished and what’s next
You’ve now created a Greengrass deployment, applied your device-specific configuration, and deployed the Edge Impulse Linux Runner component to your edge device.
The Edge Impulse Linux Runner is now downloading your ML model and starting inference. Next, you’ll verify that the model is running and view inference results.