Step 2: Creating and configuring an Amazon IoT thing - Amazon IoT SiteWise
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 2: Creating and configuring an Amazon IoT thing

In this procedure, you create and configure an Amazon IoT thing. You can designate your development computer as an Amazon IoT thing. As you progress, remember that the principles you're learning here can be applied to actual projects. You have the flexibility to make and set up Amazon IoT things on any device capable of running an Amazon IoT SDK, including Amazon IoT Greengrass and FreeRTOS. For more information, see Amazon IoT SDKs in the Amazon IoT Developer Guide.

To create and configure an Amazon IoT thing
  1. Open a command line and run the following command to create a directory for this tutorial.

    mkdir iot-sitewise-rule-tutorial cd iot-sitewise-rule-tutorial
  2. Run the following command to create a directory for your thing's certificates.

    mkdir device1

    If you're creating additional things, increment the number in the directory name accordingly to keep track of which certificates belong to which thing.

  3. Navigate to the Amazon IoT console.

  4. In the left navigation pane, choose All devices in the Manage section. Then choose Things.

  5. If a You don't have any things yet dialog box appears, choose Create a thing. Otherwise, choose Create things.

  6. On the Creating things page, choose Create a single thing and then choose Next.

  7. On the Specify thing properties page, enter a name for your Amazon IoT thing (for example, SiteWiseTutorialDevice1) and then choose Next. If you're creating additional things, increment the number in the thing name accordingly.

    Important

    The thing name must match the name used in the policy that you created in Step 1: Creating an Amazon IoT policy. Otherwise, your device can't connect to Amazon IoT.

  8. On the Configure device certificate - optional page, choose Auto-generate a new certificate (recommended) the choose Next. Certificates enable Amazon IoT to securely identify your devices.

  9. On the Attach policies to certificate - optional page, select the policy you created in Step 1: Creating an Amazon IoT policy and choose Create thing.

  10. On the Download certificates and keys dialog box, do the following:

    1. Choose the Download links to download your thing's certificate, public key, and private key. Save all three files to the directory that you created for your thing's certificates (for example, iot-sitewise-rule-tutorial/device1).

      Important

      This is the only time that you can download your thing's certificate and keys, which you need for your device to successfully connect to Amazon IoT.

    2. Choose the Download link to download a root CA certificate. Save the root CA certificate to the iot-sitewise-rule-tutorial. We recommend downloading Amazon Root CA 1.

  11. Choose Done.

You have now registered an Amazon IoT thing on your computer. Take one of the following next steps:

  • Continue to Step 3: Creating a device asset model without creating additional Amazon IoT things. You can complete this tutorial with only one thing.

  • Repeat the steps in this section on another computer or device to create more Amazon IoT things. For this tutorial, we recommend that you follow this option so that you can ingest unique CPU and memory usage data from multiple devices.

  • Repeat the steps in this section on the same device (your computer) to create more Amazon IoT things. Each Amazon IoT thing receives similar CPU and memory usage data from your computer, so use this approach to demonstrate ingesting non-unique data from multiple devices.