Step 1: Download and save the Amazon IoT Device Client - Amazon IoT Core
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Step 1: Download and save the Amazon IoT Device Client

The procedures in this section download the Amazon IoT Device Client, compile it, and install it on your Raspberry Pi. After you test the installation, you can save the image of the Raspberry Pi's microSD card to use later when you want to try the tutorials again.

Download and build the Amazon IoT Device Client

This procedure installs the Amazon IoT Device Client on your Raspberry Pi.

Perform these commands in the terminal window on your local host computer that is connected to your Raspberry Pi.

To install the Amazon IoT Device Client on your Raspberry Pi
  1. Enter these commands to download and build the Amazon IoT Device Client on your Raspberry Pi.

    cd ~ git clone https://github.com/awslabs/aws-iot-device-client aws-iot-device-client mkdir ~/aws-iot-device-client/build && cd ~/aws-iot-device-client/build cmake ../
  2. Run this command to build the Amazon IoT Device Client. This command can take up to 15 minutes to complete.

    cmake --build . --target aws-iot-device-client

    The warning messages displayed as the Amazon IoT Device Client compiles can be ignored.

    These tutorials have been tested with the Amazon IoT Device Client built on gcc, version (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110 on the Oct 30th 2021 version of Raspberry Pi OS (bullseye) on gcc, version (Raspbian 8.3.0-6+rpi1) 8.3.0 on the May 7th 2021 version of the Raspberry Pi OS (buster).

  3. After the Amazon IoT Device Client finishes building, test it by running this command.

    ./aws-iot-device-client --help

If you see the command line help for the Amazon IoT Device Client, the Amazon IoT Device Client has been built successfully and is ready for you to use.

Create the directories used by the tutorials

This procedure creates the directories on the Raspberry Pi that will be used to store the files used by the tutorials in this learning path.

To create the directories used by the tutorials in this learning path:
  1. Run these commands to create the required directories.

    mkdir ~/dc-configs mkdir ~/policies mkdir ~/messages mkdir ~/certs/testconn mkdir ~/certs/pubsub mkdir ~/certs/jobs
  2. Run these commands to set the permissions on the new directories.

    chmod 745 ~ chmod 700 ~/certs/testconn chmod 700 ~/certs/pubsub chmod 700 ~/certs/jobs

After you create these directories and set their permission, continue to (Optional) Save the microSD card image.