Bright Wolf Blog, Partners

5 Best Practices for Running Scalable IoT Architecture Solutions on AWS

By following this list of best practices, your IoT solution can leverage the scalability of Amazon Web Service (AWS) infrastructure and let your team focus on the most important part of your business: your customers.

Whether you’re building a connected solution for asset management, predictive maintenance, yield optimization, or other business goal, the ultimate value returned to your organization will be determined by how well the system meets your domain-specific requirements and individual needs of your customers.

By properly leveraging AWS infrastructure and services as outlined here, the IoT solution you build today will continue to “just work”, no matter how big or how fast your business grows.

1. Be ready for the data tsunami on Day 1

It’s going to hit eventually, and whether the flood of incoming data comes from a sudden surge in business, consistent monthly growth, or even a malicious attack, your system should be prepared to handle it right from the start. Fortunately, there are ways to architect your system that allow AWS components to ensure all of your data is always reliably processed. By understanding and adopting proper AWS IoT architecture upfront, you free your team to focus on building application intelligence (where the value is created from the data) and can move ahead confidently with your market strategy no matter how ambitious it may be.

2. Pay attention to the weakest link

AWS IoT Rules allow you to trigger many different actions upon receipt of a message. While all AWS services adapt to different data flow properties, not all services are designed to be used as the single point of entry into the system. Some have behaviors that could prevent all of your data from being processed as desired.

For example, in high volume applications you should consider buffering or queueing incoming data before invoking downstream services like AWS Lambda, so that in the event of subsequent failures the application still has the ability to recover.

With unpredictable spikes in data load, in the time it takes for a Lambda function to spin up there could already be hundreds of thousands of messages in the pipeline. Going to Lambda directly in this example could result in message loss. But If our data is buffered in Kinesis first, this provides downstream systems more processing time for any large spikes of incoming data.

3. Get IoT data into a queue as soon as possible

The best way to ensure all incoming data is processed correctly is to go directly from AWS IoT into a Simple Notification Service (SNS) queue which allows AWS to fan out your data for processing and ensure the entire flood is reliably captured every time. Many services can subscribe to the SNS topic, including Amazon Simple Queue Service (SQS) and Lambda, which can be called to initiate processing of the queue. By getting your data somewhere ‘safe’ prior to processing – such as a queue, Amazon Kinesis, Amazon S3, and Amazon Redshift – you will not lose any messages due to errors that may occur later due to code or deployment issues.

4. Sometimes the best way to scale is not to scale at all

While we’ve shown you how you can architect your solution to leverage the scaling power of AWS, sometimes you don’t want to process all of your machine data in the cloud.

One way to reduce traffic in the cloud is to run AWS Greengrass at the edge. Greengrass can intelligently process and filter data locally, eliminating the need to send all device data upstream. You may not need to send 100% of your device data all the time. You can capture it all, and store it for a limited time, sending to the cloud only when requested or upon certain error conditions. Alternately, you can choose to send a periodic sample or percentage of device data for use by AWS Machine Learning models and other cloud analytics tools that have been tuned to extract the most value out of even the smallest amounts of device data.

While AWS infrastructure allows your system to automatically scale when it needs to, it also provides the ability to process data from your devices whenever and however you want to.

5. Choose the ingest that is best

Just because you are building an IoT system doesn’t mean all your different types of data have to go through AWS IoT Core. AWS IoT supports both MQTT and WebSockets, and there are appropriate settings for each service based on recommended use cases. If you ever find yourself bumping up against AWS IoT service limits, there’s a good chance you’re just not using the right service for the particular task.

MQTT is perfect for small payloads of sensor data typical in IoT systems. In a legacy system architecture with log files or XML file dumps, however, it may make more sense to parse the files and send selective values up via MQTT in small chunks. Let’s say you want more than a few values out of the file, it could in fact be more appropriate to send file data via Kinesis or directly to S3 and process it later. MQTT was intended for enabling communications on extremely small embedded devices, why use your device’s limited power for parsing when it can be offloaded to the cloud?

The story is the same for historical and 3rd party data. S3 may be the answer, or it may perhaps be best to ingest into Amazon RDS database or via your own custom REST API backed by Amazon API Gateway. The key point is that AWS provides several options for data ingest, processing, and storage which should be considered as options for different types of data for use in your IoT solution. By taking the step upfront to choose the right AWS tool for the right job, you can maximize the scalability your overall solution provides and realize more value from IoT on AWS.

Putting it All Together

Bright Wolf has used these best practices to deliver IoT solutions on AWS across Manufacturing, Oil & Gas, Cold Chain Transportation, Healthcare, Agriculture, Smart Building, Heavy Equipment, and other industries. If you’re looking to get started on a rapid prototype or are facing challenges with the architecture of an existing system, we can help. Let’s talk about your project, and we’ll share more guides and case studies to accelerate your digital strategy and implementation initiatives.

About Bright Wolf

Bright Wolf helps industrial enterprises increase business value by transforming operations and organizations with digital strategy, technology, solution delivery, and team enablement.

Industrial IoT Newsletter

Featured in…

IoT OneCIO ReviewIoT Agenda IoT Evolution IoT Inc IoT Central IoT for All Industry Today

Learn how Bright Wolf can help your team

Bright Wolf Services

Digital strategy, architecture, development, integration, and operations

IoT Platform Accelerators

Connect equipment and generate value in the cloud faster with AWS and Azure solution starters

Client Success Stories

Learn how Bright Wolf clients are optimizing operations & creating business value for customers