Understanding AWS IoT With An Example

Milind Sutar Software Engineer, Nuro Technologies
Milind Sutar
Software Engineer, Nuro Technologies

Amazon Web Services (AWS) IoT is a cloud service that allows IoT devices to connect and interact with other devices and services. It provides secure communication between connected devices and other services over the internet. The devices could be anything – from sensors to smart switches, and appliances.

AWS Infrastructure also allows businesses to collect essential data which can be analyzed and processed to perform actions or draw conclusions. Every device connected to AWS IoT gives you the ability to control it remotely through applications which are developed for this purpose.  Once an IoT device is connected to the AWS cloud it can easily be managed & updated for additional security by attaching private security policies from the AWS Console. The communication between the connected devices and AWS opens a number of ways you can interact with your smart device and vice-versa.

This communication can happen in any of the following protocols:

  • MQTT (Message Queuing and Telemetry Transport)
  • MQTT over WSS (Websockets Secure)
  • HTTPS (Hypertext Transfer Protocol – Secure)
  • LoRaWAN (Long Range Wide Area Network)

 

Why should you use AWS IoT?

AWS IoT is a serverless platform, hence it will cost you only how much you use it. This will help reduce the initial cost of development and maintenance. It’s a robust, scalable and secure infrastructure that can handle a large number of devices. Data exchange between the device-to-device and devices-to-service is completely secure.

Understanding AWS IoT through the example: 

Let’s say you have a smart switch with you, right out of the box and the device is already registered on AWS IoT.

Each such Device registered on AWS has its own blueprint called Shadow: You can also consider it a digital twin. Device Shadow allows connected devices to sync states with AWS. Shadows are fully customizable as per the business need.

Device shadow example
Connected – true or false tells us if the device is online. The other parameters are fully customizable as per the state of the device

{
 "state": {
    "reported": {
      "connected": "true",
      "state_1" : 40,
      "state_2" : "dim",
      "state_3 : 2000
    }
  }
}

Whenever a smart switch is connected to AWS IoT via the internet, it can sync with AWS and keeps updating its shadow on predefined intervals or in real-time based on how it is programmed.

Let’s put a representative shadow of a smart switch which can change dim levels and it can report back temperature.  The shadow can be something like

{
 "state": {
    "reported": {
      "connected": "true",
    "power_level" : 50,
    "temperature: 80
    }
  }
}

Use Case

When user performs an action on mobile to set the load level to 50, this request goes to the server; which in response sends an MQTT command to the device. The device upon accepting the command will make the change in its state and update the device shadow on AWS.  Once a new update reflects in shadow, the mobile application also syncs its data with the latest shadow to reflect the new changes on UI, all in real-time. This is a very basic use case to help you understand how an IoT device works on the AWS IoT platform.

AWS IoT explained with practical example

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave a Reply

Your email address will not be published. Required fields are marked *

This website uses cookies to ensure you get the best experience on our website.