Using AWS Glue ETL Job with Streaming Data

   Go back to the Task List

  « 5. Register the Device    7. Create Database and Table »

6. Create IoT Rule

You now create an AWS IoT rule which will route the device messages to Kinesis Data Stream. AWS IoT uses publish-subscribe mechanism for the communication. The messages from the device are sent to a topic. The rule will read messages published at the topic and save it to the Kinesis data stream.

  1. On the AWS IoT Core console. Click on Rules menu under Act in the left and then click on the Create a rule button.

    Policy Menu

  2. On the next screen, enter dojoiotrule for the rule name. Type in SELECT * FROM ‘iot/dojoinbound’ for the Rule query stattement. In this configuration, The topic name is iot/dojoinbound. The rule is reading all the messages published to the topic. You also have choice to filter the messages for the rule. Next click on the Add action button to add action for the rule.

    Policy Menu

  3. On the next screen, there are many different types of actions to handle the messages. Select Send a message to an Amazon Kinesis Stream as an option and click on the Configure action button.

    Policy Menu

  4. On the next screen, select dojostream as the stream name. Type in ${newuuid()} as the Partition key. Click on the Select link to the choose role to authorize the rule action.

    Policy Menu

  5. Select dojoiotrole from the listed roles. It is the same role you created earlier. Click on the Select link again. Finally click on the Add action button.

    Policy Menu

  6. It comes back to the rule configuration screen with the action configured. Click on the Create rule button in the bottom of the screen.

  7. The rule is created in no time. The device side configuration is ready. In the next task, you start with Glue side configuration.