Create an input for models in AWS IoT Events
When you construct the inputs for your models, we recommend gathering files that contain sample message payloads that your devices or processes send to report their health status. Having these files helps you define the inputs that are required.
You can create an input through multiple methods that are described in this section.
Create a JSON input file
-
To get started, create a file named
input.json
on your local file system with the following contents:{ "motorid": "Fulton-A32", "sensorData": { "pressure": 23, "temperature": 47 } }
-
Now that you have this starter
input.json
file, you can create an input. There are two ways to create an input. You can create an input by using the navigation pane in the AWS IoT Events console. Or, you can create an input within the detector model after it's created.
Create and configure an input
Learn how to create an input, for an alarm model or a detector model.
-
Log into the AWS IoT Events console
or select the option to Create a new AWS IoT Events account. -
In the AWS IoT Events console, in the upper left corner, select and expand the navigation pane.
-
In the left navigation pane, select Inputs.
-
In the right corner of the console, choose Create input.
-
Provide a uniqueInputName.
-
Optional – enter a Description for your input.
-
To Upload a JSON file, select the
input.json
file that you created in the overview for Create a JSON input file. Choose input attributes appears with a list of your entered attributes. -
For Choose input attributes, select the attributes to use, and choose Create. In this example, we select motorid and sensorData.pressure.
-
Optional – Add relevant Tags to the input.
Note
You can also create additional inputs within the detector model in the AWS IoT Events console