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)
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
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).
-
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.
-
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. -
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
version1.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 -
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:-
Configuration
in the Boto3 Documentation Guide -
Configuration and credentials file settings in the AWS CLI Documentation Guide
-