https://github.com/awslabs/aws-iot-device-client

The AWS IoT Device Client provides device-side functionality for AWS IoT Services.

https://github.com/awslabs/aws-iot-device-client

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

The AWS IoT Device Client provides device-side functionality for AWS IoT Services.

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: apache-2.0
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 2.14 MB
Statistics
  • Stars: 143
  • Watchers: 8
  • Forks: 73
  • Open Issues: 6
  • Releases: 16
Created over 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

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 * Installation * Setup & Configuration * Jobs Feature * Fleet Provisioning Feature * Device Defender Feature * Secure Tunneling Feature * Named Shadow Feature - Sample Shadow Feature - Config Shadow Feature * Sensor Publish Feature * Provisioning with Secure Elements Feature * Logging * HTTP Proxy * Samples: - MQTT Pub/Sub Sample Feature * Doxygen Documentation * Additional Resources * Security * License

Introduction

Sections: * Current Capabilities * List of Supported Platforms

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: * The base client handles MQTT connectivity with AWS IoT core - it enables your IoT device to automatically connect and make subscriptions to feature-relevant MQTT topics. It also provides a logging API for device side logs. * The client-side Jobs feature enables you to execute remote actions on your device when you use the Jobs feature of the AWS IoT Device Management service. It provides support for a few remote actions by default, and extensibility for custom actions. You can use custom actions to remotely control the state of your IoT devices. * The client-side Secure Tunneling feature enables secure, privileged access to your IoT device when you use the Secure Tunneling feature in the AWS IoT Device Management service. * The client-side Device Defender feature enables you to collect standard Device Side Metrics when you use the Rules Detect feature in the AWS IoT Device Defender service. * The client-side Fleet Provisioning feature enables you to replace provisional credentials with device-specific ones when you onboard a fleet of devices using the Fleet Provisioning capability of AWS IoT Core. It creates a device specific certificate and private key, and registers the device on AWS IoT Core. * The client-side Named Shadows feature enables you to control your IoT device using AWS IoT Named Shadows. Shadows can store your device's state information and make it available to your device, AWS IoT services, your custom apps and other AWS services whether the device is online and connected to AWS IoT or not.

List of Supported Platforms

The AWS IoT Device Client is currently compatible with x86_64, aarch64, armv7l, mips32, ppc64, and ppc64le architectures and common Linux software environments (Debian, Ubuntu, and RHEL).

Installation

Sections: + Minimum Requirements + Building from source + Running the tests + Advanced Compilation

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

  • Base Images: Multi-stage Dockerfiles which will build dependencies only (target=base) or build the Device Client from your current directory(target=deploy).
  • Dockerfile: Takes two BUILDARGS: OS(ubuntu/amazonlinux/ubi8) and BASEIMAGE(Image URI). Build target deploy will build Device Client from your current directory using the provided BASEIMAGE. Build target **minimumsize** will build a minimum sized Docker image with the Device Client binary using the BASE_IMAGE.

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

  • Sonarcloud code analysis results are viewable at: https://sonarcloud.io/project/overview?id=awslabs_aws-iot-device-client
  • Cppcheck is a lightweight, open-source tool that has been configured to run on against every commit. To run the analysis manually: ./static-checks/run-cppcheck.sh
  • Coverity checks our main branch against rules from the MISRA coding standard.

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

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Create event: 26
  • Release event: 4
  • Issues event: 17
  • Watch event: 11
  • Delete event: 22
  • Issue comment event: 45
  • Push event: 66
  • Pull request review comment event: 21
  • Pull request review event: 64
  • Pull request event: 78
  • Fork event: 9
Last Year
  • Create event: 26
  • Release event: 4
  • Issues event: 17
  • Watch event: 11
  • Delete event: 22
  • Issue comment event: 45
  • Push event: 66
  • Pull request review comment event: 21
  • Pull request review event: 64
  • Pull request event: 78
  • Fork event: 9

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 44
  • Total pull requests: 87
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 30
  • Total pull request authors: 17
  • Average comments per issue: 4.34
  • Average comments per pull request: 0.29
  • Merged pull requests: 51
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 8
  • Pull requests: 22
  • Average time to close issues: 8 days
  • Average time to close pull requests: 3 days
  • Issue authors: 5
  • Pull request authors: 2
  • Average comments per issue: 2.25
  • Average comments per pull request: 0.0
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • monelgordillo (4)
  • AleksandarGT (4)
  • thomas-roos (4)
  • antoine-sac (2)
  • robert-hanuschke (2)
  • RogerZhongAWS (2)
  • brnaba-aws (2)
  • fstehle (2)
  • chutiapandi (1)
  • amazonKamath (1)
  • rathnamachary (1)
  • cah-rita-kassar (1)
  • jlordiales (1)
  • ramg44 (1)
  • ig15 (1)
Pull Request Authors
  • ig15 (25)
  • RogerZhongAWS (22)
  • HarshGandhi-AWS (21)
  • shangabl (11)
  • tony-josi-aws (7)
  • timmattison (4)
  • aduskett (3)
  • arunsathiya (2)
  • JarryShaw (2)
  • benjacam (2)
  • philcali (2)
  • brnaba-aws (2)
  • satheshantanu (1)
  • prilepski (1)
  • BolongZhang-AWS (1)
Top Labels
Issue Labels
bug (32) enhancement (9)
Pull Request Labels
Needs Review! (7) WIP (2)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
proxy.golang.org: github.com/awslabs/aws-iot-device-client
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.3%
Average: 5.4%
Dependent repos count: 5.6%
Last synced: 10 months ago

Dependencies

.github/workflows/base-images.yml actions
  • actions/checkout v2 composite
  • aws-actions/configure-aws-credentials v1 composite
  • docker/build-push-action v3 composite
  • docker/metadata-action v4 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/build.yml actions
  • actions/checkout v2 composite
  • actions/upload-artifact v2 composite
  • aws-actions/configure-aws-credentials v1 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/coverity.yml actions
  • actions/checkout v1 composite
  • aws-actions/configure-aws-credentials v1 composite
.github/workflows/cppcheck.yml actions
  • actions/checkout v1 composite
  • aws-actions/configure-aws-credentials v1 composite
.github/workflows/doxygen.yml actions
  • actions/checkout v2 composite
  • ad-m/github-push-action master composite
.github/workflows/e2e-ci.yml actions
  • actions/checkout v2 composite
  • aws-actions/configure-aws-credentials v1 composite
  • docker/build-push-action v3 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/lint.yml actions
  • actions/checkout v1 composite
  • aws-actions/configure-aws-credentials v1 composite
.github/workflows/notification.yml actions
  • slackapi/slack-github-action v1.19.0 composite
.github/workflows/release-ci.yml actions
  • actions/checkout v2 composite
  • aws-actions/configure-aws-credentials v1 composite
  • docker/build-push-action v3 composite
  • docker/metadata-action v4 composite
  • docker/setup-buildx-action v2 composite
  • docker/setup-qemu-action v2 composite
.github/workflows/sonarcloud.yml actions
  • actions/checkout v3 composite
  • sonarsource/sonarcloud-github-c-cpp v1 composite
.github/docker-images/Dockerfile docker
  • ${BASE_IMAGE} latest build
  • ${OS} latest build
.github/docker-images/integration-tests/ubuntu/Dockerfile docker
  • ${BASE_IMAGE} latest build
  • ${OS} latest build
  • ${PRE_RELEASE_IMAGE} latest build
.github/docker-images/base-images/device-client/amazonlinux/Dockerfile docker
  • amazonlinux 2.0.20230307.0 build
  • base latest build
.github/docker-images/base-images/device-client/ubi8/Dockerfile docker
  • base latest build
  • registry.access.redhat.com/ubi8/ubi latest build
.github/docker-images/base-images/device-client/ubuntu/Dockerfile docker
  • base latest build
  • ubuntu 18.04 build
.github/docker-images/base-images/integration-tests/amazonlinux/Dockerfile docker
  • public.ecr.aws/amazonlinux/amazonlinux 2.0.20230307.0 build
.github/docker-images/base-images/integration-tests/ubi8/Dockerfile docker
  • registry.access.redhat.com/ubi8/ubi latest build
.github/docker-images/base-images/integration-tests/ubuntu/Dockerfile docker
  • ubuntu 18.04 build
.github/docker-images/integration-tests/amazonlinux/Dockerfile docker
  • ${BASE_IMAGE} latest build
  • ${PRE_RELEASE_IMAGE} latest build
.github/docker-images/integration-tests/ubi8/Dockerfile docker
  • ${BASE_IMAGE} latest build
  • ${PRE_RELEASE_IMAGE} latest build