awslabs / aws-iot-device-client

The AWS IoT Device Client provides device-side functionality for AWS IoT Services.
Apache License 2.0
127 stars 64 forks source link

AWS IoT Device Client

Notice: Running the AWS IoT Device Client will incur usage of AWS IoT services, and is likely to incur charges on your AWS account. Please refer the pricing pages for AWS IoT Core, AWS IoT Device Management, and AWS IoT Device Defender for more details.

Jump To:

Introduction

Sections:

Back To The Top

The AWS IoT Device Client is free, open-source, modular software written in C++ that you can compile and install on your Embedded Linux based IoT devices to access AWS IoT Core, AWS IoT Device Management, and AWS IoT Device Defender features by default. It serves as a reference implementation for your IoT devices to work with AWS IoT services, with operational best practices baked in – using it is the easiest way to create a proof-of-concept (PoC) for your IoT project. What’s more, since it is open-source, you can modify it to fit your business needs, or optimize it when you wish to scale up from a PoC to production.

Current Capabilities

The modular IoT Device Client consists of a “base client” and discrete “client-side features” that support the following:

Installation

Sections:

Back To The Top

Minimum Requirements

Note: The TLS stack, and the version of the SDK mentioned above is what our CI uses. You could potentially use a different TLS stack for example, we just don't actively test or support this.

Docker

The AWS IoT Device Client currently provides several docker images on various platforms and Linux distributions.

To build a Docker image from the repository locally simply run the docker-build.sh script with your preferred OS (ubuntu/amazonlinux/ubi8) (e.g. docker-build.sh ubuntu) if no OS is passed the build will default to ubuntu (18.04).

For a minimum sized fully built AWS IoT Device Client Docker image simply pull your preferred architecture/OS combination from our repository here

Docker Files

Building from source

To use the AWS IoT Device Client, you'll need to compile an executable using the source code provided by this repository. Below, you'll find instructions for how to build the AWS IoT Device Client for your target machine.

Quick Start

The following commands should work for most users when you plan to run the AWS IoT Device Client on the same machine that you're performing the compilation on:

# Building
git clone https://github.com/awslabs/aws-iot-device-client
cd aws-iot-device-client
mkdir build
cd build
cmake ../
cmake --build . --target aws-iot-device-client

# Setup
cd ../
./setup.sh # At this point you'll need to respond to prompts for information, including paths to your thing certs

# Run the AWS IoT Device Client
./aws-iot-device-client # This command runs the executable

Running the tests

cmake ../
cmake --build . --target test-aws-iot-device-client
./build/test/test-aws-iot-device-client

Advanced Compilation

Advanced Compilation

Setup and Configuration

AWS IoT Features

AWS IoT Device Client Samples

MQTT Pub/Sub Sample Feature

Logging

Logging Readme

Doxygen Documentation

Doxygen Documentation Readme

Additional Resources

Static Analysis

AWS Documentation

This section provides links to additional AWS IoT resources that may help you use and modify the AWS IoT Device Client:

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Back To The Top