Skip to content

aws/aws-iot-device-sdk-python-v2

Repository files navigation

AWS IoT Device SDK v2 for Python

Version

This document provides information about the AWS IoT Device SDK v2 for Python. This SDK is built on the AWS Common Runtime

Jump To:

Installation

Minimum Requirements

  • Python 3.7+

Step-by-step instructions

Install from PyPI

MacOS and Linux:

python3 -m pip install awsiotsdk

Windows:

python -m pip install awsiotsdk

Install from source

# 1. Create a workspace directory to hold all the SDK files
mkdir sdk-workspace
cd sdk-workspace

# 2. Clone the repository. You could select the version of the SDK you desire to use.
git clone -b <SDK_VERSION> https://github.com/aws/aws-iot-device-sdk-python-v2.git

# 3. (Optional) Setup the version number of your local build. The default version 
#    for awsiotsdk is set to "1.0.0-dev", you can set the version number of the
#    local build in "aws-iot-device-sdk-python-v2/awsiot/__init__.py"
sed -i "s/__version__ = '1.0.0-dev'/__version__ = '<SDK_VERSION>'/" \
  aws-iot-device-sdk-python-v2/awsiot/__init__.py

# 4. Install using Pip (use 'python' instead of 'python3' on Windows)
python3 -m pip install ./aws-iot-device-sdk-python-v2

Samples

Samples README

Mac-Only TLS Behavior

Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.7.3, when a stored private key from the Keychain is used, the following will be logged at the "info" log level:

static: certificate has an existing certificate-key pair that was previously imported into the Keychain.  Using key from Keychain instead of the one provided.

Getting Help

The best way to interact with our team is through GitHub. You can open a discussion for guidance questions or an issue for bug reports, or feature requests. You may also find help on community resources such as StackOverFlow with the tag #aws-iot or if you have a support plan with AWS Support, you can also create a new support case.

Please make sure to check out our resources too before opening an issue:

License

This library is licensed under the Apache 2.0 License.

Latest released version: v1.22.0