Ingesting data from Amazon IoT things
Learn how to ingest data to Amazon IoT SiteWise from a fleet of Amazon IoT things by using device shadows in this tutorial. Device shadows are JSON objects that store current state information for an Amazon IoT device. For more information, see Device shadow service in the Amazon IoT Developer Guide.
After you complete this tutorial, you can set up an operation in Amazon IoT SiteWise based on Amazon IoT things. By using Amazon IoT things, you can integrate your operation with other useful features of Amazon IoT. For example, you can configure Amazon IoT features to do the following tasks:
-
Configure additional rules to stream data to Amazon IoT Events, Amazon DynamoDB, and other Amazon Web Services. For more information, see Rules in the Amazon IoT Developer Guide.
-
Index, search, and aggregate your device data with the Amazon IoT fleet indexing service. For more information, see Fleet indexing service in the Amazon IoT Developer Guide.
-
Audit and secure your devices with Amazon IoT Device Defender. For more information, see Amazon IoT Device Defender in the Amazon IoT Developer Guide.
In this tutorial, you learn how to ingest data from Amazon IoT things' device shadows to assets in Amazon IoT SiteWise. To do so, you create one or more Amazon IoT things and run a script that updates each thing's device shadow with CPU and memory usage data. You use CPU and memory usage data in this tutorial to imitate realistic sensor data. Then, you create a rule with an Amazon IoT SiteWise action that sends this data to an asset in Amazon IoT SiteWise every time a thing's device shadow updates. For more information, see Ingesting data using Amazon IoT Core rules.
Topics
- Prerequisites
- Step 1: Creating an Amazon IoT policy
- Step 2: Creating and configuring an Amazon IoT thing
- Step 3: Creating a device asset model
- Step 4: Creating a device fleet asset model
- Step 5: Creating and configuring a device asset
- Step 6: Creating and configuring a device fleet asset
- Step 7: Creating a rule in Amazon IoT Core to send data to device assets
- Step 8: Running the device client script
- Step 9: Cleaning up resources after the tutorial
Prerequisites
To complete this tutorial, you need the following:
-
An Amazon Web Services account. If you don't have one, see Setting up an Amazon Web Services account.
-
A development computer running Windows, macOS, Linux, or Unix to access the Amazon Web Services Management Console. For more information, see Getting Started with the Amazon Web Services Management Console.
-
An Amazon Identity and Access Management (IAM) user with administrator permissions.
-
Python 3 installed on your development computer or installed on the device that you want to register as an Amazon IoT thing.