How AWS IoT Greengrass and AWS Lambda Allow Legacy Hardware to be Cloud-Enabled
By Mike Nashadka, Chief Technology Officer – 42Q
By Scott Robertson, Sr. Partner Solutions Architect – AWS
Much of the hardware used on the factory floor today has been in place for many years, and managing these devices from the internet often requires replacement of the hardware.
Utilizing AWS IoT Greengrass and AWS Lambda functions allow legacy hardware to be maintained, while providing full internet connectivity and management. This post will explain how 42Q, an AWS Industrial Software Competency Partner, uses AWS IoT Greengrass to allow legacy label printers to be cloud-enabled.
42Q provides users with a cloud-based manufacturing execution system (MES) offering advantages in efficiency and cost relative to legacy, on-premises solutions. It provides simplified access, ease of use, and higher system uptimes.
By combining multiple IT components into a single, optimized cloud solution, 42Q provides scalability with minimal overhead and infrastructure. Servers, data storage devices, networking equipment, and software are all accessible within a powerful, streamlined cloud environment.
42Q consolidates many proven manufacturing applications using a common interface, simplifying reporting and training. This proven architecture is accessible, reliable, scalable, and secure.
Manufacturing customers have a need to print labels on the plant floor, using the 42Q cloud-based MES system. Customers have invested in a large number of label printers used during the assembly process.
To protect this investment for their customers, 42Q researched multiple solutions. One solution was to use a CUPS print server, but this required the printers be on the same network as the CUPS server. The connection was not secure, and routing to the internet was complex.
Another solution was to upgrade all of the printers to cloud-enabled printers, but this was expensive and management at scale would have been problematic. The selected solution needed to be secure across the internet, not require a virtual private network (VPN) connection, not impact the current CUPS solution, and use Layer 7 for easy routing.
AWS IoT Greengrass, with an AWS Lambda function to access the print job and control the printers, was selected by 42Q to cloud-enable all of the legacy printers.
An innovative combination of storing the print messages in an Amazon Simple Storage Service (Amazon S3) bucket, while using AWS IoT Greengrass and a Lambda function to retrieve the print messages solves the problem of maintaining the investment in legacy printers, while allowing print messages to be deployed from the cloud.
The general flow of the application is:
- The 42Q application receives a request, either from a user request a trigger from workflow, to print a label.
- The print job is created and stored in an Amazon S3 bucket.
- An MQTT message is created indicating the print job is ready, and the MQTT message is published to AWS IoT Core.
- The AWS IoT Greengrass device on the factory floor subscribes to the MQTT topic that the print job is ready, and then notifies a Lambda function.
- AWS Lambda connects to the S3 bucket and retrieves the print job.
- A second Lambda function sends the print job to the local printer, and notifies the 42Q application the print job has been completed.
The deployment architecture requires only one outbound connection from the customer’s on-premises location, yet allows for bi-directional communication that is secure and encrypted through the use of certificates and keys.
The use of AWS IoT Greengrass Groups simplifies updates to the Greengrass devices, and keeps devices running the latest code versions.
Figure 1 – AWS IoT Greengrass printing architecture.
Maintenance and Deployment
This architecture protects the customer’s investment in legacy hardware and provides a secure infrastructure for deploying code updates and enabling new functionality.
The AWS Device Qualification Program allows customers to choose hardware from a number of vendors whose devices have been qualified for AWS IoT Greengrass. Once the customer has chosen the appropriate hardware, AWS IoT Greengrass is installed, along with the appropriate certificates and keys.
After connectivity to AWS IoT Core has been established, the Lambda functions are deployed from the 42Q application to the local Greengrass device. Once the new device has been registered in the 42Q application, users can select the device for printing applications.
This post has shown how customers can preserve their investment in legacy hardware without compromising cloud connectivity. AWS IoT Greengrass allows local printers to send status and receive print jobs securely to the cloud, without compromising functionality or requiring a hardware upgrade.
42Q – AWS Partner Spotlight
42Q is an AWS Industrial Software Competency Partner that provides users with a cloud-based manufacturing execution system (MES) offering advantages in efficiency and cost relative to legacy, on-premises solutions.
*Already worked with 42Q? Rate the Partner
*To review an AWS Partner, you must be a customer that has worked with them directly on a project.