Published in


How To Use AWS IoT Core to Build & Scale Your IoT Solution

IoT has taken the world by storm. Now with the number of connected devices increasing the quality of life is also improving. However, the greatest challenge that developers face is getting all these devices to communicate with each other in sync. On the other hand, if the infrastructure isn’t efficient enough from the beginning then scaling could be impossible.

What is AWS IoT Core?

AWS IoT Core is a system that is managed cloud service that is able to connect your devices securely, enabling them to communicate not only with other Amazon devices but also with other cloud applications and devices. You can send, read, process and transfer data between your connected devices in real-time with AWS IoT Core over a secure connection.

The greatest catch is that AWS IoT Core gives you the ability to manage a lot of devices at once. Since it can connect to other AWS solutions, giving you full control over all your devices in AWS suit. Nowadays companies are offering IoT development services like these.

There are a lot of uses for AWS IoT Core, however, we will give you an overview of how to connect your devices and how you can manage your data, in this article.

Devices in IoT Core

Register Your Devices

The first and foremost step is to register your device using AWS IoT Core.

Keep in mind that in AWS IoT Core, each device is called a thing. A thing can be either a logical or physical representation of a device. The device registry is the place where you assign your device as a thing in AWS IoT Core.

Only one device can be registered at a time, for example, when a sensor keep a track of the temperature in a particular room. One can register many devices, for example, when managing a fleet of self-driving cars. You can create a group of IoT device registries. This allows you to accumulate all devices to apply the same sets of commands to many devices at once.

Configure and Provision Devices

After the registration, you need to arrange your device and make it usable. You will require three resources to set up your device for use in IoT Core:

Just-in-Time Registration (JITR)

It requires a lot of time and effort to register every single device individually and could cause a lot of problems when you are using your own device management solution.

JITR helps you to set an efficient workflow that registers device certificates and automatically links IoT policies to them. JITR can easily be used with any existing certificates or AWS-generated certificates. JITR is most effective if you already have a device certificate for your device issues by a third-party CA (Certificate authority). This is a way to automatically register your device withing having to copy the certificates onto your device.

If you are someone who uses their own CA, then you have to register a CA certificate in order to validate your device certificate, first. Usually, device manufacturers have information about this although it is difficult for them to register a device. With JITR it is easy to as your device is per-registers and ready to use.

Just-in-Time Provisioning (JITP)

JITP does all the things that JITR is capable of doing, but is a little more efficient. For example, JITR requires a couple of extra steps: creates a rule and an AES Lambda function, which activates the device certificate and attaches the policies to that certificate.

There are 2 steps if you want to use JITP

  • It is vital to attach a provisioning template to the device certificate. A document that tells IoT Core about the other devices your devices interact with is called a provisioning template.
  • Attachment to IAM role to the device certificate. The object that specifies what AWS services the device has access to is called an IAM.

JITP at a higher level will create the IoT thing and the policy in AWS IoT. Attach this policy to the certificate and attach the same certificate to the thing. On completion of this, your device would be ready to use in IoT Core.

Manage Your Devices

Sending and Receiving Messages

In AWS IoT Core, you can send and receive information from devices in real-time using two protocols:

  • MQTT: is a lightweight pub/subprotocol. It is commonly used in areas where the network is scarce and sending huge amounts of data is not possible. It is regarded as the device-to-device protocol and is commonplace for IoT solutions.
  • HTTP: This protocol is used when you want to send data over the web. It can usually support more information transfer than MQTT and is not suitable for lower bandwidth areas.

You can filter, transform and route data through AWS Message Broker from your device to any other you have connected to AWS IoT Core. AWS Message Broker is a pub/sub service that enables its users to send messages by publishing them to a topic. Users can then receive these messages by simplifying subscribing to that particular topic.

There is a possibility that the users may be other devices in AWS resource or IoT Core entirely. However, sending one message to many different users allows your to finale tune topics on Message Broker, so users only receive and send the data you want them to.

AWS IoT Core features

AWS IoT easily integrates with various existing AWS resources including Amazon Simple Queue Service, Amazon Simple Notification Service, AWS Lambda, Amazon DynamoDB, Amazon Kinesis, and Amazon Simple Storage Service (S3).

Device Shadow Service

If you have got a chance to manage an IoT solution, you must be aware that the device data isn’t available always and devices may try to communicate with each other at inconvenient hours of the day. You can store the most recently communicated state of your device with AWS’s Device Shadow service. So in scenarios when your device goes offline, resources that are drawing data from your device can display the latest device state and on top of that, you don’t need to worry about data interruption.

Jobs Service

Job Services are another set of services that allows you to communicate with other devices regularly and effectively. This Service will allow you to create and schedule job actions to send commands to various devices and would enable you to see the history of jobs on a device.

For Job Services, Firmware updates are a great application. You can easily use the Job Service to schedule common firmware updates and also view past updates.

AWS IoT Core is a powerful tool that is indeed a complicated process for genuine device communication. Yes, JITR and JITP can make it easy for the developer to configure these devices, and Message Broker, Jobs Service, and Rules Engine all make it seamless to schedule and send commands.

Hopefully, this blog has helped you to understand how AWS IoT Core could help your business in future deployments. It can be the tool that you need to connect devices both small-scale and large-scale IoT deployments, simple and easy.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nora Winkens

Daffodil Software is a partner in software technology for more than 100 organizations around the world.