The Control Engineer’s Guide to Amazon AWS – Part 2

AWS IoT Architecture

The AWS IoT Architecture

In part 1, I described AWS history and the creation of AWS IoT. In this article, I discuss the AWS IoT architecture. The AWS IoT architecture is composed of Data Services, Control Services and Device Software. This architecture is built to do the three things outlined earlier in this article: control devices; process data; and simplify ingestion into AWS. Let’s take a look at each of the three components in detail.

Device Software

The Device Software group is a set of products, services and components designed to simplify the process of developing hardware and software applications for moving data from the edge of the automation architecture into Amazon AWS.

AWS IoT Device SDK is a set of open-source software libraries that have the software needed to build connected embedded applications on off-the-shelf or custom hardware. The libraries are designed for devices that are not resource-constrained as they require support for processor-intensive features like multi-threading and queuing. Developers can use popular language bindings like C, C++, Python, Java and JavaScript to build applications using these software development kits.

AWS FreeRTOS is the AWS version of the MIT open source licensed FreeRTOS kernel. It is designed to make lower-resourced controllers easy to program, deploy, connect and manage with AWS tools and services. Devices built with AWS FreeRTOS can be connected to AWS IoT Core and AWS IoT Greengrass. It is designed as a kernel for developers who want to build low-power devices that can securely connect to the cloud or other edge devices.

On the AWS website, you can find a large group of vendors with PCBs that use FreeRTOS. These PCBs can be used to jumpstart an IoT project.

AWS Greengrass is an extension of AWS IoT Core services that bring control, communications and services from the cloud to the edge. AWS IoT is designed to provision (configure), control and communicate with edge devices. Greengrass is a way to do that locally without a connection to the cloud.

Greengrass operates as something like a broker device – providing a layer between AWS and the devices associated with it. It can operate as both a publisher and a subscriber. It connects with other AWS-enabled devices, provisions those devices, exchanges data with those devices and performs services. Greengrass is the sole communication interface between AWS IoT Core and the devices in its group. It configures devices, deploys certificates and exchanges data with the AWS Cloud for its devices.

Data published to Greengrass core can also be processed by small executable code packages called AWS Lambda functions. AWS Lambda functions exist to bring local compute functionality to the edge. An AWS Lambda function can be triggered by local events, messages from the cloud, and other sources as proscribed by the user-defined business rules. Lambda functions can be easily deployed on Greengrass devices anywhere in the world.

Unlike standard IoT devices, Greengrass hubs continue to operate when no connection to the cloud is available. A Greengrass device continues to communicate with its group of devices, executing AWS Lambda functions and processing data per the business rules.

Unlike the IoT Device SDKs, Greengrass is offered only as a precompiled binary package for Linux operating systems with specific minimum resources (1Ghz core, 128MB Ram). Greengrass can be combined with a device SDK to create a custom hub device.

AWS IoT Device Tester is a tool for validating a device that implements the FreeRTOS core operating system. It performs tests to ensure that the device can successfully communicate to the AWS IoT Core and correctly publish and subscribe to MQTT messages.

Control Services

The Control Services group is a set of services to manage the devices in an AWS IoT application.

AWS IoT Core is the foundation for enabling edge devices to securely connect with AWS Cloud services. AWS IoT Core provides the communication for internet-connected devices (such as sensors, actuators, embedded devices, wireless devices, and smart appliances) to connect to the AWS Cloud over MQTT, HTTPS, and LoRaWAN.

IoT Core can support a very large number of devices and vast numbers of messages. With AWS IoT Core, your applications can interact with all of your devices even when they aren’t connected.

AWS IoT Core ingests simple ASCII data packages like JSON packets.

AWS IoT Device Management services track, monitor, and manage the devices connected to the IoT Core. Device Management services manage device software, regulate firmware updates and assist with remote monitoring and device health.

AWS IoT Device Defender is a tool for validating the configuration of devices connected to AWS IoT Core. The AWS IoT Device Defender continuously monitors device security configurations and sends alerts when it detects a possible security risk.

AWS IoT Things Graph is a service for visually constructing IoT applications. The AWS IoT Things Graph provides a drag-and-drop interface for creating connections between edge devices and cloud services.

Data Services

The set of cloud and on-premise services for extracting value from data in AWS IoT Core.

AWS Analytics is an AWS cloud service for performing sophisticated analytics on massive volumes of data. It can filter and transform massive data sets on a one-time or scheduled basis. It includes built-in SQL query engine and machine learning.

AWS IoT SiteWise is an AWS cloud service for collecting data from industrial equipment. AWS IoT SiteWise organizes data by defining assets and models. Data can be collected from historians and industrial protocols like EtherNet/IP and Modbus TCP. Data can be combined with other data in the AWS IoT Core and presented in an AWS IoT SiteWise monitor. The big advantage to AWS IoT SiteWise is the ability to organize data by the asset, production line or facility.

AWS Events is an AWS cloud service that identifies and responds to events generated by physical inputs from sensors and signals from cloud applications. The AWS Event service integrates with other services, such as AWS IoT Core, IoT SiteWise, DynamoDB, to detect events.

The Event Service is highly functional. Events detectors can be configured to recognize events using simple logical expressions operating on inputs from multiple sources. Detectors can be configured for a specific device type and then used for all instances of that device type. Events can trigger actions in other AWS Services like the Amazon Simple Notification Service (SNS), AWS IoT Core, AWS Lambda and Firehose.

AWS is becoming increasingly important for control engineers and this article and the previous one provide the foundation to understand where it came from and where AWS IoT is going.