Setting up to use AWS IoT Core for Amazon Sidewalk - AWS IoT Core

Setting up to use AWS IoT Core for Amazon Sidewalk

Before you connect your Sidewalk end device, you must set up your AWS account and configure the AWS CLI.

Important

To perform the entire onboarding workflow for provisioning and registering your Sidewalk end device, you must also set up your Sidewalk gateway and the HDK. For instructions, see Setting up the hardware development kit (HDK) and Setting up a Sidewalk gateway in the Amazon Sidewalk documentation.

Install Python and Python3-pip

To use the AWS CLI and boto3 as described in the next section, you must use a Python version 3.6 or later. If you want to onboard your end devices using the AWS IoT console, you can skip this section and continue to setting up your AWS account. To check whether you’ve already installed Python and Python3-pip, run the following commands. If running these commands return the version, it means that Python and Python3-pip have been installed correctly.

python3 -V pip3 --version

If this command returns an error, it might be because Python is not installed, or your operating system calls the Python v3.x executable as Python3. In that case, replace all instances of python with python3 when you run the commands. If it still produces an error, either download and run the Python installer, or install Python depending on your operating system as described below.

Windows

On your Windows machine, download Python from the Python website and then run the installer to install Python on your machine.

Linux

On your Ubuntu machine, run the following sudo command to install Python.

sudo apt install python3 sudo apt install python3-pip
macOS

On your Mac machine, use Homebrew to install Python. Homebrew also installs pip, which then points to the installed Python3 version.

$ brew install python

Setting up your account and AWS CLI

The following steps show you how to configure your AWS account, AWS CLI, and boto3 (AWS SDK for Python).

  1. Set up your AWS account

    To use AWS IoT Core for Amazon Sidewalk, sign up for an AWS account and create an administrative user. For instructions, see Set up your AWS account.

  2. Install and configure the AWS CLI

    You can use the AWS CLI to programmatically onboard your Sidewalk end devices to AWS IoT Core for Amazon Sidewalk. If you want to onboard your devices using the AWS IoT console, you can skip this section. Open the AWS IoT Core console and then continue to the next section to get started with connecting your devices to AWS IoT Core for Amazon Sidewalk. For instructions on configuring the AWS CLI, see Installing and configuring the AWS CLI.

  3. Install boto3 (AWS SDK for Python)

    The following commands show you how to install boto3 (AWS SDK for Python) and the AWS CLI. You'll also install botocore, which is required to run boto3. For detailed instructions, see Installing Boto3 in the Boto3 Documentation Guide.

    Note

    awscli version 1.26.6 requires PyYAML version that's 3.10 or later, but not later than 5.5.

    python3 -m pip install botocore-version-py3-none-any.whl python3 -m pip install boto3-version-py3-none-any.whl
  4. Configure your credentials and default Region

    Configure your credentials and default Region in the ~/.aws/credentials and ~/.aws/config files. The boto3 library uses these credentials to identify your AWS account and authorize API calls. For configuration instructions, see: