Getting started with AWS IoT Core

With a brief understanding of the AWS IoT suite of services covered, we can now dive deep into the world of the AWS IoT Core! However, before we get started with some actual hands-on projects, here is a quick look at some important AWS IoT Core concepts and terminologies:

The AWS IoT Core service provides bidirectional communication between devices and the AWS cloud, using a set of components described in the following list:

  • Device gateway: This provides a secure mechanism for the IoT device to communicate with the AWS IoT service.
  • Device shadow: A device shadow is a persistent representation of your IoT device on the cloud. A JSON-based document stores the current state of your device, which you can use to sync with the cloud.
  • Message broker: The message broker provides a secure and reliable channel, using which the IoT device can communicate with the cloud. The broker is based on a publisher–subscriber model and can be used to leverage either the standard MQTT protocol, or the advanced MQTT over WebSockets for communication.
  • Registry: Registry is a service that is used to securely register your IoT device with the cloud. You can use the registry to associate certificates and MQTT client IDs with your devices.
  • Groups: Groups are logical containers used to group together similar devices in order to effectively manage them. You can use groups to propagate permissions and perform bulk actions on your connected devices.
  • Rules: The rules engine service in AWS IoT Core provides a mechanism which enables you to process IoT data using simple SQL queries. You can additionally write rules that can integrate AWS IoT Core with other AWS services, such as AWS Lambda, Amazon S3, Amazon Kinesis, and so on.

Here is how it all fits together! You start off by preparing a device for connection with the AWS IoT Core. This involves creating a set of certificates that essentially authenticates the device when it connects to the AWS IoT Core. Once connected, the device starts publishing its current state in a JSON format using the standard MQTT protocol. These messages are sent to the message broker, which essentially routes them to their respective subscribing clients, based on the message's topic.

You can even create one or more rules to define a set of actions based on the data contained within the messages. When a particular data matches the configured expression, the rules engine invokes that particular action, which can be anything from sending the data to a file in Amazon S3 to processing the data using AWS Lambda or Amazon Kinesis. The following is a representation of these components put together:

Keeping this in mind, let's look at how you can connect your IoT device with the AWS IoT Core!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset