Choosing between FreeRTOS, Greengrass, ExpressLink, Device Client and the IoT Device SDKs

6 minute read
Content level: Intermediate
1

Are you building an IoT device that will connect to AWS IoT Core? Maybe you’ve heard of FreeRTOS, AWS IoT Greengrass, AWS IoT ExpressLink, AWS IoT Device Client or the AWS IoT Device SDKs but you’re unsure which one is right for you. This article introduces the AWS IoT device software options, explains the primary value proposition, and gives high-level guidance on how to choose the best option for your device.

Introduction

Product development can be challenging. The development cycle can be long and modern cloud-connected products require a multi-disciplinary team with skills in many domains: hardware, firmware, cloud and more. AWS IoT device software aims to ease the burden on product teams by making it easier to securely connect devices to the cloud. AWS offers numerous device software options, but it’s not always immediately apparent which one is the best candidate for your product. This article aims to steer you in the right direction so you can get on with building.

The focus of this article is specifically on AWS IoT device software that helps you connect devices to AWS IoT Core. If you wish to connect browser or phone apps to AWS IoT Core, please refer to the AWS Amplify PubSub library or the AWS Mobile SDKs.

The value proposition

AWS IoT Core supports several protocols: MQTT, HTTP, LoRaWAN and Amazon Sidewalk.

LoRaWAN and Sidewalk devices don't communicate directly with AWS IoT Core, and AWS IoT device software is not intended to be used in developing those kinds of devices. For devices that communicate to AWS IoT Core using HTTP, AWS IoT device software is not required because you can use the regular AWS SDKs to access the AWS IoT Core data plane.

By contrast, AWS IoT device software has rich support for MQTT, the most popular of the AWS IoT Core protocols. As shown in Figure 1, AWS IoT Core offers numerous value-added features built on top of MQTT reserved topics, such as AWS IoT Device Shadows, AWS IoT Jobs, AWS IoT Over the Air (OTA) updates, AWS IoT Device Defender, AWS IoT fleet provisioning and more.

Figure 1: AWS IoT Core MQTT value-added features

Figure 1: AWS IoT Core MQTT value-added features

These features solve common IoT use cases. You can use almost any MQTT client to connect to AWS IoT Core, but the primary value proposition of AWS IoT device software is that it includes implementations of these features. These implementations are undifferentiated heavy lifting that can accelerate your product development and reduce your time to market.

The AWS IoT device software options

C-SDK iconAWS IoT Device SDK for Embedded C (C-SDK)Highly-portable and lean open-source C libraries for use on resource-constrained micro-controllers that run a real-time operating system or micro-kernel of your choice, or are even bare metal.
FreeRTOS iconFreeRTOSOpen-source real-time operating system for microcontrollers, with FreeRTOS Core connectivity libraries and FreeRTOS for AWS IoT libraries included.
ExpressLink iconAWS IoT ExpressLinkPowers hardware connectivity modules developed by AWS partners. These modules offer a simple serial interface and are intended to be usually paired with a host processor to create your product.
IoT Device SDK iconsAWS IoT Device SDKs for Python, Java, JavaScript and C++Open-source libraries to help you connect your device to AWS IoT Core using your preferred language. Each SDK comes with samples demonstrating the usage of major features such as AWS IoT Device Shadows, AWS IoT Jobs and AWS IoT Device Defender. For more information, see this earlier article.
Device Client iconAWS IoT Device ClientOpen-source reference implementation of an embedded Linux IoT device that you can fork and use as the basis of your device. AWS IoT Device Client is built on the AWS IoT Device SDK for C++ V2 and is written in C++.
Greengrass iconAWS IoT GreengrassOpen-source edge runtime and companion cloud service to help you compose, deploy and manage powerful IoT applications on resource-rich devices. It offers pre-built components for rapid application development, such as local/cloud MQTT messaging, support for local edge processing including Machine Learning (ML) inference, logging and monitoring, out-of-the-box integration with AWS services, and local data aggregation, filtering, and transmission to cloud targets.

The AWS IoT device software spectrum

The chart in Figure 2 positions the AWS IoT device software options on a spectrum, ranging from inexpensive micro-controllers (MCUs) on the left, through to capable micro-processors (MPUs) on the right, with some indicative MCUs/MPUs shown. As we move to the right, the cost, memory and processing power all increase, and we shift from a micro kernel to a monolithic operating system. As a rule of thumb, you should consider using the rightmost device software that your hardware is capable of supporting.

Figure 2: AWS IoT device software spectrum

Figure 2: AWS IoT device software spectrum

FreeRTOS and the AWS IoT Device SDK for Embedded C (C-SDK) are aimed at resource-constrained micro-controller systems and are often the only viable choices for such devices. The decision between FreeRTOS and the C-SDK is largely driven by your choice of preferred operating system.

AWS IoT ExpressLink shields development teams from many of the software engineering tasks required to integrate a device with the cloud, and is consequently very appealing when development schedule and skills gaps trump the device BOM cost.

AWS IoT Device Client and the AWS IoT Device SDK for C++ V2 are typically best-suited to embedded Linux devices that do not meet the requirements to run AWS IoT Greengrass. Should you have an embedded Linux device, you may also be interested in the meta-aws project, which provides recipes for building AWS IoT device software into your distribution.

As we move further to the right on the spectrum, additional programming languages become feasible. The AWS IoT Device SDKs for Python, Java and JavaScript, can then be considered. In general however, AWS IoT Greengrass offers the most undifferentiated heavy lifting and will often be the best choice for any device with sufficient resources to run it. The AWS IoT Device SDKs would then be used to develop custom Greengrass components that make use of Greengrass interprocess communication (IPC).

This spectrum is only broad guidance, not prescriptive. You might, for instance, choose to use AWS IoT ExpressLink or one of the AWS IoT Device SDKs on a resource-rich Linux device because your product’s IoT requirements are simple, and the power and learning curve of AWS IoT Greengrass may be unwarranted.

Nonetheless, this spectrum and article should help you quickly orient yourself to the AWS IoT device software options that are likely the strongest candidates for your device, and are therefore worthy of your deeper consideration.

Related questions

1 Comment

Great post! It is helpful to see the range of IoT device software options from AWS and how to select the best option. You could include Arm Cortex-A and Neoverse on the right side of your AWS IoT device software spectrum. There are several examples of Greengrass as well as Linux and Windows. [Disclosure: I work for Arm, but my comments are my own]

profile picture
EXPERT
replied 6 months ago