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.

Important

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:

Image Alt Text:Greengrass deployment page showing the option to deploy to a group of devices with a thing group selectedDeploy to a group of devices

To deploy to a specific device (for example, your EC2 edge device), select a single core device:

Image Alt Text:Greengrass deployment page showing the option to deploy to a single core deviceDeploy to a single device

After choosing your target, complete the following steps:

  1. Select Next.

  2. On the components page, select your EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent custom component:

    Image Alt Text:Component selection page with the EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent checkbox selectedSelect the custom component

    Note

    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:

    Image Alt Text:Component selection page with both the Edge Impulse Linux Runner and RuntimeInstaller components selectedSelect both components for non-camera devices

  3. Select Next again.

  4. Select the EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent and select Configure component to customize the component for your device:

Image Alt Text:Component configuration page with the EdgeImpulseLinuxEdge Impulse Linux RunnerServiceComponent selected and the Configure component button visibleConfigure the component

Note

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:

  1. Clear the Configuration to merge text box, paste the JSON that you saved from edge device hardware setup, and select Confirm:

    Image Alt Text:Configuration to merge dialog showing the JSON configuration pasted into the text boxPaste the device-specific configuration

    The 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_name or gst_args for each target’s specific hardware.

  2. Continue selecting Next through the remaining pages until you reach the review page.

  3. Select Deploy:

    Image Alt Text:Deployment review page showing the final configuration summary with the Deploy buttonReview 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.

Back
Next