- Newest
- Most votes
- Most comments
To debug your custom AWS IoT Greengrass component that uses IPC Pub/Sub on your local machine, you have a few options:
-
Use the local debug console: Deploy the local debug console component to your core device. This provides a local dashboard web interface where you can view details about installed components, create local deployments, and monitor your component's behavior.
-
Utilize the Greengrass CLI: Deploy the Greengrass CLI component to your core device. This allows you to create local deployments, view details about installed components, and explore log files directly on your device.
-
Implement local testing: You can perform local testing of your Greengrass components before deployment. One approach is to use a unit test harness and mock the IPC calls. This can help you achieve automated test coverage for your component.
-
Local deployment for integration testing: Deploy your component locally on your development machine to a Greengrass instance. This allows for integration testing of the component, assuming it doesn't have dependencies on hardware not available on your machine. You can use the Greengrass CLI to deploy your component quickly and repeatedly during development.
-
Use environment variables: On your development Greengrass v2 device, you can run a basic component that logs environment variables such as AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT and SVCUID. Set these in your .env file and pass them to the component you're developing while Greengrass is running on the same machine. This allows the Greengrass IPC to work as expected outside of an active deployment.
-
Configure local MQTT interactions: If your component interacts with MQTT, you can configure your local Greengrass to interact with local client devices by deploying the MQTT broker (Moquette), MQTT bridge, Client device auth, and IP detector components. This setup allows you to use MQTT clients to connect to Moquette as a client device and perform pub/sub operations with your component via the MQTT bridge.
By combining these methods, you can effectively debug and test your custom Greengrass component that uses IPC Pub/Sub on your local machine during the development phase.
Sources
AWS IoT Greengrass development tools - AWS IoT Greengrass
Testing Greengrass Components Before Deployment with IPC | AWS re:Post
Relevant content
- AWS OFFICIALUpdated 4 months ago

Some additional links: