
The First Step Toward a Smart Factory: From Predictive Maintenance with AWS Managed Services to Leveraging Generative AI #devio2025
This article was published more than one year ago. Please be aware that the information may be outdated.
This page has been translated by machine translation. View original
I gave a talk titled "The First Step to a Smart Factory: Achieving Predictive Maintenance and Generative AI Utilization with AWS Managed Services" at "DevelopersIO 2025 Osaka," held on September 3, 2025.
Session Slides
The materials used in the presentation are published below.
Technical Challenges in Utilizing Factory Data
Before getting into the technical discussion, let's start with a brief review of the challenges we often hear about in utilizing factory data.
In a factory, various pieces of equipment operate in each process, such as conveying, machining, inspection, and sorting.
These devices are often made by different manufacturers, and the communication protocols used to obtain data, such as OPC UA, Modbus TCP, CC-Link, and PROFINET, are often different for each device, manufacturer, and sensor.
Therefore, the first challenge that arises is how to collect data centrally from these different protocols.
Furthermore, even if you can collect the data, the next challenge is how to send it to the cloud. These are security concerns: whether the internet is acceptable or a closed network is required, whether communication should be encrypted, and how to handle authentication.
Also, if the network is disconnected, is it acceptable for the data during that time to be lost, or should the device buffer it and resend it upon recovery? Just thinking about data utilization, there are many technical challenges.

Features of AWS IoT SiteWise
AWS IoT SiteWise is a service that solves these challenges in factory data utilization. It is a managed service that provides a set of capabilities for collecting, organizing, and analyzing data from industrial equipment.
AWS IoT SiteWise is used by combining a cloud-side service with a gateway application that runs on the factory floor (edge).
The main features are as follows.
- Data collection with industrial protocols:
- You can collect data from PLCs (controllers that control manufacturing equipment) and other devices directly using industrial communication protocols such as OPC UA, and integrate it with AWS.
- Simple visualization feature (SiteWise Monitor):
- It comes with a feature called "SiteWise Monitor" that lets you easily visualize collected data. You can create dashboards with mouse drag and drop, which is convenient for PoCs (proofs of concept) and small-scale visualization.
- Security:
- When connecting to an OPC UA server, it supports security features such as password authentication and mutual authentication with certificates.
- Data buffering on errors:
- If communication with the cloud is disconnected, the gateway can buffer up to 30 days of data locally and automatically resend it when communication is restored.

The SiteWise gateway is responsible for collecting data from on-site equipment and transferring it to AWS.
In addition to standard protocols such as OPC UA and Modbus TCP, it can also aggregate data from, for example, "SLMP," the proprietary protocol of Mitsubishi Electric PLCs, which have a large share in Japan.
Users do not need to implement the conversion of these protocols into cloud-oriented protocols such as MQTTS and HTTPS themselves.

AWS IoT SiteWise can also easily integrate the collected data with other AWS services.
- AWS IoT Core:
- Data received by AWS IoT SiteWise can be easily forwarded to AWS IoT Core.
- Various AWS services:
- From IoT Core, via a feature called IoT rules, you can process data with AWS Lambda, or store data in Amazon S3 through Amazon Kinesis Data Firehose and analyze and visualize it as a BI dashboard with Amazon QuickSight.
- Grafana:
- In addition to SiteWise Monitor, it also supports Grafana, an open-source dashboard tool (including Amazon Managed Grafana), with a standard plugin, enabling more advanced visualization.
Also, with the release in September 2024, it became easy to integrate with Litmus Edge Software, which supports more than 100 types of protocols. This makes it easy to collect data centrally with SiteWise even when a wide variety of protocols coexist in a factory.

Anomaly Detection with AWS IoT SiteWise
Next, I'll introduce anomaly detection, a new feature of SiteWise.
This is a brand-new feature released on July 28, 2025, and it can detect anomalies in equipment and other assets using data collected in SiteWise.
Previously, AWS had a similar service called "Amazon Lookout for Equipment," but it is no longer available to new customers. As a result, to implement anomaly detection, users had to develop machine learning models themselves using Amazon SageMaker or similar, which was a high hurdle.
I think this is a very impactful update because it lets you easily start anomaly detection without coding or specialized machine learning knowledge.
Also, while services of this type sometimes require a huge amount of training data in advance, it can automatically create a machine learning model and run inference with a minimum of 14 days of training data.

In other similar services, the inference schedule may be fixed, such as "once per hour," but with SiteWise anomaly detection, you can set up a flexible schedule to match your needs.

Example of Integration with AWS IoT Core
AWS IoT SiteWise can also easily forward anomaly detection inference results to AWS IoT Core.
This makes it easy to build a mechanism where, for example, an IoT rule is triggered under the condition "when the inferred anomaly score exceeds a certain threshold," and an email notification is sent to the person in charge via Amazon SNS.

Examples of Anomaly Detection and Analysis Using AI
In the second half of the session, I introduced several patterns of AI-based anomaly detection and analysis using SiteWise Assistant and other services.
AWS IoT SiteWise Assistant
This is a feature that lets you ask questions and perform analysis in natural language on the data accumulated in SiteWise using generative AI.
It is built into SiteWise Monitor and can be used as an AI assistant.
For example, you can ask about the data displayed on the screen, "What is the current situation?", or instruct it when trouble occurs, "Tell me the troubleshooting steps."
As a note, this feature uses Amazon Kendra as the index for RAG (Retrieval-Augmented Generation), so Kendra service charges are incurred separately. Please be mindful of the pricing when actually using it.

A Case Using MCP (Model Context Protocol)
I introduced an example of achieving AI analysis simply by combining existing services.
First, sensor data is accumulated via AWS IoT Core into a time-series database such as "Amazon Timestream for InfluxDB."
Since Timestream for InfluxDB provides an MCP (Model Context Protocol) server feature, an AI client such as Claude Desktop connects to it via MCP.
This allows users to ask the AI client questions in natural language such as "Tell me the operating status." The AI client references the data in Timestream and answers with the analysis results in natural language.

Real-Time Anomaly Detection
As a slightly different pattern, I also introduced real-time anomaly detection using Amazon Managed Service for Apache Flink.
This is a configuration that performs real-time anomaly inference on streaming data on Apache Flink using an algorithm called "Random Cut Forest."

The feature of this configuration is that it is not a fixed judgment based on thresholds.
For example, if equipment has a pattern such as "high load in the morning" and "low load in the afternoon," monitoring with a typical "threshold" cannot detect anomalies well.
I wrote that "threshold"-based monitoring cannot handle this well, but depending on the implementation, something close can be achieved.
For example, if you prepare two "thresholds" for morning and afternoon and implement a mechanism to switch monitoring notifications between morning and afternoon, it seems it could be achieved.
However, since operating conditions may also vary by season and so on, I think the "thresholds" would need constant adjustment.
By using Random Cut Forest, it automatically learns the patterns of continuously incoming data (morning movement, afternoon movement, etc.) and can detect sudden data that deviates from those patterns as an "anomaly."
In the past, I built a demo that ingested data from a vibration device and sounded a rotating warning light when an anomalous trend occurred.
At that time, an anomaly was detected when the state suddenly changed from low vibration to high vibration. An anomaly was also detected when the vibration was gradually increased and then suddenly lowered.
The key point is that no anomaly is detected when the vibration frequency is raised gradually, but an anomaly can be detected when the vibration value is suddenly lowered while the frequency is stable.
Other Services and Implementation Methods
I omitted the details due to time constraints, but patterns using the following services are also conceivable.

Summary
Here is a summary of what I conveyed in this session.
- AWS IoT SiteWise is a specialized service that supports data utilization in manufacturing.
- With the new anomaly detection feature of AWS IoT SiteWise, you can easily start anomaly detection without coding.
- Depending on the use case, you can also consider using other services such as Managed Flink and SageMaker, though some cases require some development.
- By making good use of existing mechanisms and services, it is possible to build a data analysis platform that uses generative AI with a small start.
My talk was the last one in Track B, but more people than I expected came to listen.
I hope this article is helpful to someone.
That's all.
