Integrating AWS IoT and AWS Greengrass into the Automotive Grade Linux Software Stack
Post by Hitendra Nishar, AWS Solutions Builder
Automotive Grade Linux (AGL) is an open source project to accelerate the development and adoption of a fully open software stack for connected vehicles. AGL is building a Linux-based, open software platform that can serve as the de facto industry standard and enable rapid development of new features and technologies. With the platform, automakers and suppliers can decrease development time, speed innovation, and bring new features to market faster.
AGL plans to address the entire software stack within a vehicle: infotainment, instrument cluster, Heads-up Display (HUD), telematics and connectivity, functional safety, Advanced Driver Assistance Systems (ADAS), and Autonomous Driving. For more information, see www.automotivelinux.org.
AWS IoT Framework for AGL
To help Amazon Web Services (AWS) customers leverage AGL’s open platform, the AWS Solutions team has developed the AWS IoT Framework for AGL, a reference implementation that helps you integrate AWS IoT and AWS Greengrass into the AGL software stack. The framework consists of AWS Greengrass Core and an AWS IoT binding service built using the AGL Application Framework and the AWS IoT Device SDK.
The AWS Greengrass Core manages a secure connection between your edge device and AWS IoT using certificate-based mutual TLS authentication, providing a secure message broker. The AWS Greengrass Core also allows you to run local AWS Lambda functions on AGL.
The AWS IoT binding service is built using the AGL Application Framework which provides components for running the binding service in an isolated, secure environment, and for managing the application life cycle. The Application Framework exposes the service API to publish or subscribe to MQTT topics on AWS Greengrass Core. Other AGL applications and services can invoke the binding service API using supported protocols such as WebSockets or D-Bus. For more information, see AGL framework overview.
The binding service also uses the AWS IoT Device SDK for C++ to securely communicate with the AWS Greengrass Core using MQTT. For more information, see AWS IoT Device SDK.
The diagram below shows how an application running on AGL can send telemetry data to AWS IoT using the framework.
When the telemetry application starts, the framework loads dependent services, such as CAN bus and AWS IoT binding services; performs the necessary security checks; and establishes the connections for these services to interact with the telemetry application via the WebSocket or D-Bus protocols.
The AWS IoT binding service uses the AWS Greengrass API to discover the AWS Greengrass Core endpoint and securely connect to it. The binding service also exposes the publish and subscribe APIs used by the telemetry application to send the data to and from the AWS Cloud via the AWS Greengrass Core using MQTT topics.
The CAN bus binding service exposes the subscribe APIs that the telemetry application invokes to consume the telemetry data.
The framework provides isolated security context for all the services and processes running on the AGL software stack.
To get started on the reference implementation, please check the open-source Github repository at github.com/awslabs/aws-iot-framework-for-agl