IoT for Beginners
In today’s world, every organization would want to use the enormous amount of data generated across devices, to create visibility and predictability for their business and support needs. Given the fact that millions of devices are getting connected over the internet, one should know where to start and how to navigate in the wilderness of the IoT arena. This article would help you get going in IoT, using the AWS IoT platform, starting from data subscription, data storage management and the basic graphical reporting of your data.
The AWS IoT platform comprises of broad and deep functionality and it also integrates services such as database, analytics, and reporting. The ease-of-use of the platform encourages beginners to start their IoT endeavor, being well equipped with the basic features to get on to the IOT platform. In this example, we will use a small IoT data simulator which can generate data and can send the data to the AWS IoT Platform. Here the entire process is segregated into three major categories such as Data
Collect, Data Store and Data Reporting.
Prepare your environment to generate IoT data with the simulator, running it on Node.js software with the necessary permissions enabled. In your AWS account, use IoT Core services to on-board and configure your device. While on-boarding, you would be able to download the connection kit which contains the necessary certificates, the private key and other details for you to securely subscribe and publish the data to the IoT platform. You can use the sample script which is available in the connection kit, which can be downloaded and customized to simulate data and send to the AWS IoT platform. Enable the policy to accept data from the source and start your testing by subscribing your topic in MQTT client. On completion of this process, you should be able to send and receive messages to your IoT device or simulated platform.
The data fed into the IoT platform can be passed to various services to make use of it. In this scenario, the received raw data will be stored in S3. In the IoT Core, the rules regarding what to do with the received data can be configured and customized. Creating a rule is as simple as writing a simple SQL query statement and passing the output to an action, where you can define to which supported destination the data should be passed.
Instead of directly passing the data to S3, we can use AWS Kinesis Firehose Stream (which we can use later for transform / convert the source records to the desired output model) and then store the data in S3 storage. To create a rule in IoT core with a simple query statement click “SELECT” from “Subscribed Thing” and enable the action to pass the data to Amazon Kinesis Firehose Stream. Create a new resource with the necessary AWS IoT access permissions to perform the action in Kinesis Firehose. Then configure Firehose Stream without enabling Transform or Convert fields and select the destination as Amazon S3 bucket where your data will be stored. Now, create a new IAM role to access the S3 bucket. On completion of the above process, your data will get streamed into Amazon Kinesis Firehose stream and get stored in the specified S3 bucket. You can also create some simple rules to trigger a mail alert using SNS or to store data in DynamoDB with some conditions and rules on received data (have some fun…)
A graphical illustration of the live data creates an edge for the business as it is easy to interpret the dynamic data. Using AWS IoT platform, with the integration of IoT Analytics, Lambda functions and Cloudwatch we can have the dynamic data illustrated graphically.
Create a rule in IoT core to pass the data to IoT Analytics engine, where you can create channels and pipelines to stream the data and to initiate lambda function activity on the channel inputs. Then, create a lambda function to pass the processed data into cloudwatch logs and customize your cloudwatch console to have the desired graphical illustration. Now, necessary IAM roles and permissions to be created and provisioned across layers during this process.
Amazon AWS IoT platform with integrated services, helps beginners to have relevant hands-on experience in IoT with minimal cost. Hope the above details help you to kick-start your IoT endeavor in AWS Cloud. Do watch out this space for the detailed step-by-step guide on the same subject