IoT has become quite the buzzword? The smart devices that talk to each other transmitting and collecting enormous amounts of data, surround us every day of our lives. A lot of work has gone into creating this huge network of data transmission and collection. AWS has been hard at work to create and offer IoT solutions. These solutions make it easier to build applications connecting to devices far and wide.
Let us consider a simple use case:
In the above scenario, the smart meter sends its instantaneous parameters (critical meter data) on a timely basis (e.g. every 15 mins) to the telecom provider via the built-in modem, which forwards them to a user endpoint where the data is processed and stored. So how does the flow work? Let’s take a look at the components of this use case:
The endpoint has only one requirement, i.e., it must be up at all times.
When the telco provider sends the parameters, the endpoint must be ready to catch it. What are our options to pursue this? We could set up an EC2 Instance, Elastic Beanstalk, or Elastic Container Service (ECS) as the endpoint. But these come with a few caveats. First off, there is no guarantee that the VM has a 100% uptime. Any load balancing measure put in place is guaranteed to have some provisioning delay which will lead to dropped packets. This is unacceptable. Alternatively, we need to have a surplus planned capacity to avoid overload.
Secondly, the task of the endpoint could be to receive the data and store it in a bigdata backend datastore, albeit a million times over!
So we have to find a solution that guarantees to have 100% uptime, relieves us of the responsibility of the hardware and can handle an enormous amount of requests to perform a simple and quick operation on them. I can see you mouthing the words – serverless; serverless; AWS Lambda!
Not to suggest that Lambda functions have guaranteed uptime, but the onus is on the cloud provider to make sure the endpoint stays up, freeing you of the responsibility. In addition, it also provides a retry mechanism and allows a second chance to receive the data.
This is a perfect use case for Lambda functions which can read the data coming from the requests and store them into, say, DynamoDB. In fact, AWS has precisely a service like this called IoT Core, which is powered by AWS Lambda. Our use case has only one smart meter, but we know that is hardly the case in real scenarios. We will generally be dealing with thousands, if not millions of meters making it a perfect case for the managed service from AWS to deal with scale, availability, and reliability.
Furthermore, if we want to put in place a system to detect if any meters are tampered with. Let’s consider the challenges we might face here:
a) Tampering with a meter can be disastrous to the entire system and needs to detect and dealt with immediately
b) The number of data points generated may be
c) The telemetry data will more often than not be in binary format and will need to be preprocessed into a readable format like JSON or XML.
So we need something that can accept the telemetry data from a large number of sources. Also, transform them into a readable form and then run an integrity check based on that data; all in
Yes, we are talking about AWS Kinesis. We can collect all the data into a Kinesis stream, pass this data into a Lambda function to transform it. Then use Kinesis Data Analytics to detect meter tampering. The tampered data can then be stored in an S3 bucket, which sends out a notification via SNS to alert the
Custom Smart Device
Let’s say you have built your own custom smart device and want to use that instead of third party provided devices (eg smart meters). You have to develop the firmware and ensure its compatibility with AWS services. Fear not, there’s a service for that too. One of the AWS IoT solutions, Greengrass can help you build and test device software which interfaces with device sensors and use Lambda functions to perform data operations before sending it out on the cloud.
Armed with the knowledge of all these services, let us take another look at our initial use case.
Using the power of AWS Services, we have taken a simple transmission from a smart device and turned it into a highly scalable, tamper-resistant and modular behemoth with complete control over every component.
Considering the wealth of services provided by AWS, developing IoT solutions for a wide range of industries has become simple and the initial entry barrier which existed earlier has been lifted. These frameworks and services help power life-saving services and adding to the betterment of mankind!
To know more about the AWS based IoT solutions and other cloud computing concepts, please head to our blog section. If you wish to proceed with a career in cloud computing, upskill with Great Learning’s PG program in Cloud Computing.6