Using AWS Glue ETL Job with Streaming Data

   Go back to the Task List

  « 4. Create S3 Bucket    6. Create IoT Rule »

5. Register the Device

Let’s move to some of the interesting parts of the workshop. In this task, you register an IoT device in order to publish the messages to the Kinesis Data Stream.

  1. You first create an IoT policy which authorizes the device to perform actions within AWS IoT core. Goto the IoT Core Console, click on Policies menu under Secure in the left and then click on the Create a policy button.

    Policy Menu

  2. On the next screen, enter policy name as dojodevicepolicy, enter “iot:*" for the Action, enter "*" for the Resource ARN, select Allow for the Effect and click on the Create button. You are creating a no restriction type policy for the workshop. However, in the production implementation, you might want to configure policies with restrictions for the actions and the resources.

    Policy

  3. The policy is ready. After creating the policy, you now create a device as thing and attach the policy to it.

  4. On the AWS IoT Core console, click on Things menu under Manage in the left and the click on the Register a thing button.

    IoT Menu

  5. On the Creating AWS IoT things screen, click on the Create a single thing button.

  6. On the Add your device to the thing registry screen, enter the device name as dojodevice1 and click on the Next button.

    Device Name

  7. On the Add a certificate for your thing screen, click on the Create certificate button. It will create certificate files which the device use for the authentication purpose. AWS IoT supports X.509 client certificates.

  8. On the Certificate created screen, click on the Activate button to activate the certificate. Finally click on the Attach a policy button.

    Certificates

  9. On the Add a policy for your thing screen, select dojodevicepolicy and click on the Register Thing button.

    Finish Thing

  10. The device registration is complete now. Later, the workshop will use MQTT Client as part of AWS IoT Core to simulate the device and send streaming data to the IoT core gateway. The next step is to add an IoT rule which IoT core will use to route device data to the Kinesis data stream.