Integrating with AWS IoT

AWS IoT (developer guide) provides secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the AWS cloud. This enables you to collect telemetry data from multiple devices and store and analyse the data. You can also create applications that enable your users to control these devices from their phones or tablets.

AWS IoT  enables acting upon device data and enabling applications to interact with devices even when they are offline.

Using AWS IoT With KotahiNet

Transmitted device data is published into the “device shadow document” in the AWS IoT. For details on how to use the MQTT protocol with the AWS IoT service, see the guide Device Shadow MQTT Topics.

Any place where the guide references thingName, we fill in the DevEUI as 16 hex digits.

The data is delivered into the state.reported object in the shadow document. For example, a message from DevEUI 00-11-22-33-44-55-66-77 will be published to topic


state : {
reported : {
cmd : 'rx',
EUI : '0011223344556677',
ts : 12345678,
fcnt : 1,
port : 1,
data : 'A1B2C3D4'


Setting Up AWS IoT To Work With KotahiNet

1. Log in to your AWS Management Console (Amazon account required). Go to the AWS IoT service.

2. Create a new thing resource for each device in your account. Use Device EUI as the Name (no dashes, just hex digits). You don’t have to add any attributes.

3. Select one of the newly created things. From the detail list on the right of the screen, look at the REST API endpoint https://[RANDOM STRING].iot.[REGION][DEVICE EUI]/shadow, and note the [RANDOM STRING] and [REGION].

4. Go to IAM Management Console. Create new user with username “loriot”. Make sure the ‘Generate an access key for each user’ checkbox is checked. Security credentials will be created for this user.

5. Click ‘show credentials’ link and note the displayed values of accessKeyId and secretAccessKey. Download the credentials for backup.

6. Go to the Permissions tab and click the Attach Policy button. From the list of policies, select the ‘AWSIoTDataAccess’ and click the Attach Policy button. A new page should appear, confirming the attached policy.

7. Send the four noted values- RANDOM STRING, REGION, accessKeyId and secretAccessKey- to KotahiNet for enabling the integration on the LoRaWAN network side.