Skip to main content

AWS IoT Core

In this guide we will walkthrough setting up AWS IoT core configuration in monoZ:Link. As part of this guide, we will setup a “thing” in AWS IoT core to receive data from monoZ:Link. We will configure AWS IoT core configuration in monoZ:Link and attach it to device group.

Setup AWS IoT Core thing

  1. Access the AWS console. AWS IoT Core -> Manage → All Devices → Things.



  2. Now click “Create Thing”.



  3. Select “Create Single Thing” and click “Next”.



  4. Enter a name in [Thing name] and click “Next”. Here, we'll name it "XXXXXXXXXXXXXXX5169".



  5. Select “Auto-generate a new certificate (recommended)” and click “Next”.



  6. The Attach Policy to Certificate - Options screen appears, where you would typically select a policy and assign it to the certificate. Since no policy has been yet, click “Create Thing” without attaching a policy.



  7. Click the corresponding Download button to download the following four files, and then click “Finish”. You will use these certificates (Device certificate, Public Key File, Private key file, Amazon Root CA 1) later. Now that the thing is created, you can create a policy to assign to the device (thing).



  8. Click Administration → Security → Policies → Create Policy. This time, we will create a new “test” policy that can publish to any MQTT topic.



  9. Set each item and click [Add new statement] and add the following items:

    [Policy Effects][Policy Action][Policy Resources]
    “permission”iot:Connect*
    “permission”iot:Publish*
    “permission”iot:Receive*
    “permission”iot:Subscribe*
  10. Click “Create”. The policy is created.



  11. Next, attach the policy created to the thing certificate. Check the certificate you created and click Actions → Attach Policy.



  12. Select AWS IoT Test, check the “Test” policy you created, and click “Attach Policy”. This completes the registration of the thing in AWS IoT Core.



  13. Finally, we will get the custom endpoint for sending data to AWS IoT Core. This endpoint shall be used when creating configuration in monoZ:Link. Access the AWS IoT console and click [Settings] and copy the contents shown in [Endpoints] under [Device data endpoints].



Setup monoZ:Link

  1. Prepare the following files downloaded upon creating AWS IoT Core Thing.

    Endpoint (Unique device data endpoint of AWS IoT core)
    Private key file random string-private.pem.key
    Device certificate random string-certificate.pem.crt
    Amazon Root CA 1 AmazonRootCA1.pem
  2. Open monoZ:Link -> Protocol configuration -> Add Configuration.



  3. Select AWS IoT Core from the dropdown list



  4. Add the configuration details and click “Save”.

    Source Protocol MQTT
    Configuration Name Test Config (Any suitable name)
    Host Paste the device endpoint from AWS
    CA File (Server Cert) Upload “Amazon Root CA 1” file
    Topic Topic to publish on AWS IoT Core. It could be “Same as incoming” or Custom topic.
    QOS MQTTS QOS for publish to AWS IoT Core. Zero or One


  5. Navigate to Groups → Add Group.



  6. Add the necessary details in the fields and click “Save”.

    Group Name Test Group (Any Name)
    Available Configuration Test Config (Select from the configuration)


  7. Go to Devices and Click “Edit icon” on the device to be connected to AWS IoT core. Attach following details in their respective fields and click “Update”. The monoZ:Link configuration for AWS IoT core connection now complete.

    Group Select the created Test group
    Client Certificate random string-certificate.pem.crt
    Client Key file random string-private.pem.key


Send data from the device

  1. Send payload data from the Device “XXXXXXXXXXXXXXX5169” to monoZ:Link. monoZ:Link shall translate protocol and push the received data to AWS IoT Core over MQTTS. It can be verified in AWS IoT console using MQTT test client feature.

AWS IoT Core Data format

monoZ:Link pushes data to the specified AWS IoT Core broker in the following format. By default each incoming message is pushed as individual outgoing message. Hence, we recommend using unique topic for each device in AWS IoT Core. Simple way to achieve this is by setting "Same as Incoming" for AWS IoT Core Topic in monoZ:Link protocol configuration. in In case of QOS 1 setting, monoZ:Link client ensure message is delivered at least once to the receiver. In case of not able to deliver the message to the server, the data will be discarded. If the database function is enabled, the data will be stored as failed data.

Example 1: Packet received at AWS IoT Core

ABC