AWS Connected Vehicle Solution
AWS Connected Vehicle Solution

Architecture Overview

Deploying this solution with the default parameters builds the following environment in the AWS Cloud.


        Connected vehicle solution architecture

Figure 1: The connected vehicle solution architecture

This connected vehicle solution leverages the AWS IoT platform which authenticates messages from connected vehicles and processes data according to five business rules. The solution’s AWS CloudFormation template deploys six unique Amazon DynamoDB tables that store various details about vehicle health, trips, and vehicle owners; a set of microservices (AWS Lambda functions) that process messages and data; an Amazon Kinesis Data Firehose delivery stream that encrypts and loads data to an Amazon Simple Storage Service (Amazon S3) bucket; an Amazon Kinesis Data Analytics application that analyzes data for anomalies; an Amazon Kinesis stream which enables real-time processing of anomalous data; and an Amazon Simple Notification Service (Amazon SNS) topic which sends alerts to users.

When AWS IoT receives a message, it authenticates and authorizes the message and the Rules Engine executes the appropriate rule on the message, which routes the message to the appropriate backend application.

Anomaly Detection

An AWS IoT rule sends telematics data to an Amazon Kinesis Data Firehose delivery stream, which encrypts and streams raw vehicle telematics data to an Amazon S3 bucket for future analysis or replay. An Amazon Kinesis Data Analytics application analyzes data from the delivery stream using a windowed machine learning algorithm to detect anomalies in the data. If an anomaly is detected, the record is sent to an Amazon Kinesis stream which invokes an AWS Lambda function that parses the record and stores it in a DynamoDB table. The Lambda function also triggers an Amazon SNS notification to users with the detected anomaly.

Trip Data

The trip data AWS IoT rule invokes a Lambda function that processes vehicle telematics data during a trip and stores it in a DynamoDB table. Data is continuously updated until the trip is completed.

Driver Safety Score

The driver safety score AWS IoT rule detects the end of a trip and invokes a Lambda function that processes aggregate trip data, and executes an algorithm to generate a driver's safety score. The function then triggers an Amazon SNS notification to the driver with their safety score. The score is added to the trip data DynamoDB table.

Diagnostic Trouble Codes

The diagnostic trouble code AWS IoT rule detects diagnostic trouble codes in the IoT topic and invokes a Lambda function that stores the trouble code in a DynamoDB table, translates the trouble code into layman’s terms, and triggers an Amazon SNS notification to the user that contains the translated trouble code.

Location-Based Marketing

The location-based marketing AWS IoT rule detects the location of the vehicle and invokes a Lambda function that determines whether the vehicle is near a point of interest. If the vehicle is near a point of interest, the function logs the location in a DynamoDB table and triggers an Amazon SNS notification to the user that contains an advertisement.

Data Interaction

The solution configures Amazon API Gateway to host the solution’s RESTful APIs, and deploys an Amazon Cognito user pool, which you can use to add user registration and sign-in to your existing connected vehicle applications.

Existing applications and third-party service providers can interact with connected vehicle data securely through the RESTful APIs. The APIs act as a “front door” for access to vehicle data stored in Amazon DynamoDB. You can also use the APIs to access any extended functionality you build into the solution.


          Connected vehicle solution data interaction

Figure 2: How applications interact with connected vehicle solution data

The applications can use Amazon Cognito to authenticate users. Once authenticated, users can submit requests to the connected vehicle solution’s APIs (Amazon API Gateway endpoints). Based on the request, Amazon API Gateway invokes the appropriate Lambda function to perform the necessary tasks on the data stored in the Amazon DynamoDB tables. You can use this data, as well as near-real-time MQTT data to build detailed graphs, charts, and reports.