Skip to content

Files

Latest commit

Jun 11, 2024
6b063b5 · Jun 11, 2024

History

History

samples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 26, 2024
Jan 30, 2024
Mar 10, 2023
Apr 19, 2023
Mar 10, 2023
Jun 11, 2024
Aug 24, 2023
Apr 19, 2023
Nov 7, 2023
Apr 24, 2023
Mar 29, 2023
Apr 19, 2023
Aug 28, 2023
Aug 28, 2023
Mar 10, 2023
Jun 11, 2024
Mar 10, 2023
Apr 19, 2023
Aug 28, 2023
Aug 28, 2023
Dec 14, 2023
Nov 7, 2023
Dec 14, 2023
Apr 19, 2023
Feb 9, 2024
Apr 19, 2023
Dec 14, 2023
Apr 21, 2023
Mar 10, 2023
Apr 19, 2023
Apr 24, 2023
Apr 24, 2023
Mar 10, 2023
Nov 2, 2023
Mar 10, 2023
Apr 19, 2023
Aug 28, 2023
Aug 28, 2023
Jan 26, 2024
Jan 26, 2024
Mar 10, 2023
Apr 19, 2023
Mar 17, 2023
Apr 19, 2023

README.md

Sample apps for the AWS IoT Device SDK v2 for Python

MQTT5 Samples

MQTT5 is the recommended MQTT Client. It has many benefits over MQTT311 outlined in the MQTT5 User Guide

MQTT311 Samples

Other

Build instructions

First, install the aws-iot-devices-sdk-python-v2 with following the instructions from Installation.

Each sample README has instructions on how to run each sample with the same name as the sample itself. For example, the MQTT5 PubSub README is mqtt5_pubsub.md and it can be run with the following:

# For Windows: replace 'python3' with 'python' and '/' with '\'
python3 mqtt5_pubsub.py --endpoint <endpoint> --cert <path to certificate> --key <path to private key>

Sample Help

All samples will show their options by passing in --help. For example:

# For Windows: replace 'python3' with 'python' and '/' with '\'
python3 mqtt5_pubsub.py --help

Which will result in output showing all of the options that can be passed in at the command line, along with descriptions of what each does and whether they are optional or not.

Enable logging in samples

To enable logging in the samples, you need to pass the --verbosity as an additional argument. --verbosity controls the level of logging shown. --verbosity can be set to Trace, Debug, Info, Warn, Error, Fatal, or None.

For example, to run MQTT5 PubSub sample with logging you could use the following:

# For Windows: replace 'python3' with 'python' and '/' with '\'
python3 mqtt5_pubsub.py <other arguments> --verbosity Debug