{"id":4250,"date":"2022-03-18T13:58:00","date_gmt":"2022-03-18T12:58:00","guid":{"rendered":"https:\/\/blog.besharp.it\/?p=4250"},"modified":"2022-03-18T09:48:56","modified_gmt":"2022-03-18T08:48:56","slug":"aws-iot-core-device-management-in-action","status":"publish","type":"post","link":"https:\/\/blog.besharp.it\/aws-iot-core-device-management-in-action\/","title":{"rendered":"AWS IoT Core Device Management in action"},"content":{"rendered":"\n
IoT ecosystems consist of thousands or more devices connected to a centralized backend that handles connections and inward and outward messages. When building our project, we need to consider how to organize our resources to allow us to search them quickly. If we don’t do this, we might operate in a chaotic environment that is difficult to manage and debug.<\/p>\n\n\n\n
Device management means a way to filter our objects quickly, find out which ones aren’t operating as they should, have organized storage for certificates and messages in a scalable manner.<\/p>\n\n\n\n
This article concludes the trilogy of our IoT overview: we described what you should consider when creating your IoT project<\/a>, how you can take advantage of AWS Rules management to trigger other services in an event-driven designed application<\/a>, and finally, how to organize your devices pool in the best possible way!<\/p>\n\n\n\n Many tasks, such as device creation, deletion, and certificate renewal, usually require multiple actions. We must automate these operations because there is a high chance of error. We can quickly do this on AWS with Lambda functions (or Step functions if the automation is more complex) that can be triggered as events by various other parts of our application.<\/p>\n\n\n\n Security is probably the most crucial aspect of IoT applications: as discussed before, we don’t want unauthorized people to access our devices. Certificates need to be stored in encrypted storage with limited access and replicated to multiple Availability Zones and, if possible, regions to reduce the chance of data loss. S3 is the perfect service for this scope because it offers encryption at rest (either managed or with KMS), replication to another bucket in another AWS region, security policies, and IAM integration to give access only to the people and applications that need to perform operations on it.<\/p>\n\n\n\n What is the order of magnitude we expect as the number of devices connected to our ecosystem? Is our application B2B or B2C? These are some questions we want to ask ourselves to define a way to organize our devices and information in an ordered manner that will help us find what we are looking for, even if the amount of filterable data is massive. <\/p>\n\n\n\n Scalability also involves the ability of our system to grow automatically based on the traffic. Serverless architectures are built to suit this purpose, so every time we add new features, we should look for a solution that doesn’t require static resource provisioning.<\/p>\n\n\n\n IoT Device Management is one of the many features of AWS IoT Core. It <\/p>\n\n\n\n offers many tools to help you organize your fleet of devices in a centralized webpage. Let’s see some of these features.<\/p>\n\n\n\n Thing types allow you to define a general description of your things and a set of attributes that every device associated with it must have. An IoT thing can be of one thing type. Thing types are immutable, so you cannot add an attribute to your thing type after creating it. If you need to do this, you have to deprecate your thing type and create a new one. You can’t associate a thing to a deprecated thing type. Think of thing type as skeletons for things configuration: if a device is of type “streetlight\u201d, it will have the attributes “wattage” and “firmware_version”.<\/p>\n\n\n\n <\/p>\n\n\n\nThe main issues we need to consider<\/h1>\n\n\n\n
Automation<\/h2>\n\n\n\n
Security<\/h2>\n\n\n\n
Scalability<\/h2>\n\n\n\n
AWS IoT Device Management<\/h1>\n\n\n\n
Thing types<\/h2>\n\n\n\n