The Internet of Things on AWS – Official Blog

Introducing AWS IoT TwinMaker

The “twin” concept is not new and actually dates back to the early days of the space program. The Apollo 13 mission in the 1960s is an early use-case example of using twins. Following the explosion of an oxygen tank in the service module, the damaged spacecraft was far beyond any situation envisioned during the design, and its state was rapidly changing. So the engineers created “twins” on Earth that represented their best understanding of the damaged state using all the engineering information available coupled with the latest sensor readings and observations from the astronauts. These twins were instrumental for NASA engineers on Earth to understand the astronauts’ predicament and drove operational decisions to return the astronaut crew safely back to Earth.

In more recent times, digital twins gained traction and have become increasingly feasible with advances and convergence of at-scale computing (in the cloud), new modeling methods, and IoT connectivity that have the potential to drive business value beyond legacy methods. To help our customers and partners realize the benefits of digital twins to drive new business outcomes we built AWS IoT TwinMaker – a new AWS IoT service that makes it faster and easier to create digital twins of real-world systems and use them to monitor and optimize industrial operations. In this post, we will define what a digital twin is, describe the common challenges faced when building a digital twin, walk through the key capabilities of AWS IoT TwinMaker service, and show you how to get started creating digital twins using AWS IoT TwinMaker.

Definition of a digital twin

Let us first define a digital twin. One vendor’s or customer’s definition of digital twin may vary drastically from another. They range from a simulation of a single physical component, predictive maintenance for a piece of equipment, to a full 3D virtual walkthrough of a factory with automated operations utilizing command and control procedures. What they all have in common is that digital twins form a digital representation of something in the physical world, updated with live data, and used to drive business outcomes. Based on these common elements, a digital twin is defined as a living digital representation of an individual physical system that is dynamically updated with data to mimic the true structure, state, and behavior of the physical system, which informs decisions that drive business outcomes.

The key difference between a digital twin and existing modeling methods such as traditional 3D modeling (CAD), physics-based simulations, virtual worlds (3D/AR/VR), IoT dashboards of streaming sensor data, and realistic gaming environments is the information flow between the digital and physical systems. The information flow allows the digital twin to represent the current state and behavior of the physical system. Many times, we equate a higher complexity and higher fidelity virtual representation with a digital twin. Rather, it is the regular updating of the virtual system that is key to the digital twin definition. A digital twin must consume the data streams to understand the present state of the system, learn from and update itself with new observations of the system, and be able to make predictions about the current and future behavior of the system. For example, a digital twin of a cookie mixer ingests temperature and RPM IoT data to predict internal motor power temperature, a non-observable quantity during operation. The digital twin is then used to make predictions of remaining useful life (RUL) under different operational conditions and maintenance scenarios, enabling the operator to select the best dispatch schedule and maintenance plan. Output from the digital twins such as the temperature or remaining useful life is then shown to the user via a dashboard, a 3D rendering showing the temperature in-situ, or some other context relevant manner. We think of the CAD models, physics simulations, IoT dashboards, 3D renderings/immersive walkthroughs, and gaming environments as key building blocks used to build digital twins, the application that represents living virtual representation of the physical system.

Challenges in creating digital twins

Creating digital twins is complex and involves multiple steps. You will need to model your physical systems, which includes expressing the elements of your physical systems (e.g., equipment, processes, sites, etc.) and the relationships between these elements. Then these models need to be connected to data sources like time-series IoT data from sensors, video data from camera feeds, application data from enterprise software, to name a few. As applications that use digital twins typically pull in data from multiple data stores, developers face a heavy lift to bring in the data from these stores. Next, you need to bring in your visual assets and provide visual context to your data and insights. Providing a comprehensive visual view of the assets and the data helps end-users easily understand the data and make better decisions faster. Finally, you need an easy way to deliver these digital twins to the end-users as web applications that they can easily bring up on different hardware platforms (such as mobile, desktop, etc.). With all these steps, creating and maintaining digital twins can be daunting, and many customers struggle with how to get started. For advanced use cases, you might also want to add insights and derive predictions through analytical, machine learning (ML), or simulation tools. For these scenarios, you will need to stream the digital twin data to and from these insight tools.

Announcing AWS IoT TwinMaker

AWS IoT TwinMaker is a new AWS IoT service to help developers create digital twins of real-world systems and use them in applications that operators can use to monitor and improve operations. Key capabilities of AWS IoT TwinMaker include:

Model builder

AWS IoT Twin Maker provides a flexible modeling capability to represent your digital twins. The model builder allows you to create workspaces that will hold the resources, such as entity models and visual assets needed to create a digital twin. Inside the workspace, you will create entities that represent digital replicas of your equipment (e.g., a mixer or pump). You can specify custom relationships between these entities to create a digital twin graph of your real-world system. For example, you can add a relationship, seen-by, to relate a camera entity to an equipment that is visualized by that camera. Using the digital twin graph, customers can now issue geospatial queries such as finding all cameras that are pointing to an equipment to help with root cause analysis.

Components (Data connectors)

For your digital twin, you will need to bring together data from various data stores and add equipment context to the stored data. AWS IoT TwinMaker makes it simple for you to combine this data in a single service without creating another data store and without requiring you to re-enter the schema information that already exists in their data stores. In AWS IoT TwinMaker, you can associate entities with connectors (called as components in AWS IoT TwinMaker) to data stores such as AWS IoT SiteWise, to provide context to the data present in various data stores. Also, previously, you will need to write data store specific APIs to read and write data from various data stores. To reduce the heavy lift needed to connect to these data stores, IoT TwinMaker provides unified access APIs that your applications can use to access the data from various stores with the same APIs regardless of where the data is stored. AWS IoT TwinMaker provides built-in data connectors for AWS IoT SiteWise for equipment and time-series sensor data, Amazon Kinesis Video Streams for video data, and Amazon Simple Storage Service (S3) for storage of visual resources (e.g., CAD files) and data from enterprise applications. AWS IoT TwinMaker also provides a framework using AWS Lambda for you to easily create custom data connectors to other data stores (e.g., Snowflake, Siemens MindSphere).

Scene composer

AWS IoT TwinMaker provides a console-based 3D scene composition tool to create visualizations in 3D. You can bring previously built 3D/CAD models (optimized for web and converted to glTF format) into your resource library in Amazon S3. Using AWS IoT TwinMaker’s scene composer, you can bring these visual assets into a scene, and position the 3D assets to match your real-world systems. AWS IoT TwinMaker makes it easy for you to bind data modeled in entities with your visualization. In the scene composer, you can add visual annotations such as tags on top of the base scene, to connect a specific 3D location with data streams or user actions for that entity. For example, you can add a tag to a cookie mixer equipment that links back to its temperature data or to its user manual documentation.

Applications

To create web-based digital twin applications, AWS IoT TwinMaker provides a plug-in for Grafana and Amazon Managed Grafana that you can use to create dashboards. The dashboards can embed the 3D scenes created using the scene composer as well as other widgets such as video player, hierarchy browser, time-series data charts, tables. The dashboards use AWS IoT TwinMaker’s unified data access APIs to populate the widgets.

Getting started with AWS IoT TwinMaker

Step 1: Create a workspace

To get started, you create a workspace that will hold all the resources such as entity models and visual assets needed to create a digital twin. To create a new workspace,

  • You will need to go to IAM in AWS Management console and create a new Role and attach the following policy to it.

Role JSON:

{   
    "Version":  "2012-10-17",   
    "Statement":[ 
        {
            "Sid":  "",
            "Effect":  "Allow",       
            "Principal": {            
                "Service": [                
                    "iottwinmaker.amazonaws.com"             
                ]        
            },        
        "Action":  "sts:AssumeRole"       
        }    
    ]
}

Policy JSON:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "iottwinmaker:*",
                "s3:*",
                "iotsitewise:*",
                "kinesisvideo:*"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
                "lambda:invokeFunction"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        },
        {
            "Condition": {
                "StringEquals": {
                    "iam:PassedToService": "lambda.amazonaws.com"
                }
            },
            "Action": [
                "iam:PassRole"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        }
    ]
}
  • Create a workspace in AWS IoT TwinMaker console using the Role created. As part of the workspace creation, you will also provide an Amazon S3 bucket to hold your resources and any optional resource tags.

User interface for creating a workspace in AWS IoT TwinMaker

Step 2: Create entities

  • Select a workspace to make the workspace active.
  • Select Entities in the left navigation.
  • Select Create to create a new Entity

User interface for creating an entity in AWS IoT TwinMaker

Step 3: Attach data sources

  • Once an entity is created, select the entity to make it active
  • In the Components tab, select Add Component to add a data connector to a data store. Provide the component name and choose from the list of available components.

User interface for creating a component in AWS IoT TwinMaker

  • If you need to create a custom component, navigate to the Component types item in the left side navigation and select Create component type. This will allow you to specify your own custom connector that you can author using AWS Lambda (see “Using and creating component types” in the documentation for more details).

Component types screen in AWS IoT TwinMaker displaying all created component types

Step 4: Add resources to your workspace

  • To add visual assets into your workspace, you can upload your 3D files in gLTF or glb format into your resource library. Select Resources in the left navigation and choose Add resources to add files to your resource library. Note: these resources will be saved in the Amazon S3 bucket under your account that you specified during workspace creation.

Resource library screen in AWS IoT TwinMaker displaying all added resources

Step 5: Compose your scene

  • Select Scenes in the left navigation and choose Create Scene to create a new scene
  • Add visual assets (gltf or glb files) from your resource library into the scene

User interface for adding a 3D model from the resource library in AWS IoT TwinMaker

  • Position the asset by changing the X, Y and Z values. Using the scene composer menu, you can also add lighting to the scene.

Scene composer user interface in AWS IoT TwinMaker

  • Add a tag to provide a data binding to an entity. Provide the entityID, componentID and property name for the tag. Place the tag on the 3D object at the desired position.

Scene composer user interface in AWS IoT TwinMaker showing an added tag

Step 6: Create your web application using Grafana

  • Run Grafana on your local desktop (using Docker) or in the cloud. Log into your Grafana instance. (See “AWS IoT TwinMaker Grafana integration” in the documentation for more details on setting up Grafana instances).
  • Add an AWS IoT TwinMaker data source. Provide your AWS IAM user credentials.

Grafana configuration screen for adding the AWS IoT TwinMaker datasource plugin

  • Add dashboards with 3D widgets, time-series charts, etc. as desired.

Grafana dashboard application showing the integrated digital twin

Partner community to accelerate your digital twin journey

To help you with your digital twin journey, you can work with AWS Partners to harness AWS IoT TwinMaker capabilities and realize the potential of digital twins for your business. AWS IoT TwinMaker has software and hardware partners who provide digital twin software solutions that are either hosted on or integrated with AWS. Examples include Siemens who provide rich application services for low-code, visualization, simulation use cases. AWS IoT TwinMaker has service partners that can help you design, architect, migrate, or build new digital twin applications on AWS. Examples include Accenture who provides professional services, Cognizant who has developed software for digital representation of buildings, FuseForward who provides digital transformation solutions for critical industries such as utilities and healthcare, and TensorIoT who provides their Smart Insights platform for industrial equipment. We also have modeling, simulation, and visualization partners that provide software tools and services used to create digital twins with AWS IoT TwinMaker. Examples include advanced simulation providers such as Ansys and Maplesoft, modeling partners such as Element Analytics and Embassy of Things that help unlock data from industrial systems, dashboard and visualization providers such as Grafana Labs, and immersive 3D model generators such as Matterport. For more details, visit the AwS IoT TwinMaker partner page.

Conclusion

With AWS IoT TwinMaker, you can easily get started with creating digital twins of real-world systems and use them in web applications that operators can use to monitor and improve operations. Common use cases that use digital twins to improve operations include the ability to remotely monitor your facilities, identifying equipment alerts in the context of your environment to schedule maintenance and reducing downtime, adding visual context to your operational data to create a single, comprehensive, real-time 3D view of your physical system.

To help you get started with building your digital twin, we have provided a sample cookie factory workspace. Access our sample code at this GitHub repository. The sample code will guide you through the process of building a digital twin application using AWS IoT TwinMaker and lets you explore many of the features of AWS IoT TwinMaker.

About the author

Raj Devnath bio picture Raj Devnath is a Senior Product Manager at AWS working on AWS IoT TwinMaker. He is passionate about IoT and AI and helping customers extract value from their IoT data. His background is in delivering solutions for industrial and consumer end markets such as Smart buildings, home automation, data communication systems, etc.