We use machine learning technology to do auto-translation. Click "English" on top navigation bar to check Chinese version.
How to replicate Amazon Web Services IoT SiteWise resources across environments
Introduction
As you scale your
To help customers replicate Amazon Web Services IoT SiteWise resources between environments, we created
Asset Model Export Walkthrough
The utilities in the Amazon Web Services IoT SiteWise Tools repository give you the flexibility to replicate only the resources you need for your specific use case. You can choose to only export Amazon Web Services IoT SiteWise asset models, or also export the corresponding assets and Amazon Web Services IoT SiteWise Monitor dashboards. The export tool can be used manually from the command line (e.g. for a one-time export of an asset model into another environment) or can be integrated into your automation pipelines for CI/CD deployment scenarios. The utility can also be used to copy Amazon Web Services IoT SiteWise resources for multi-region deployments within the same account. The Amazon Web Services IoT SiteWise Tools repository has detailed documentation on how to use each of the utilities but for a basic demonstration of the tools, we created two asset models of a CNC Machine and Production Line as seen below. Each model contains a property and a hierarchical relationship between the two models.
To keep it simple, we will only export the models. Using the Amazon Web Services IoT SiteWise export tools, we optionally specify the region we want to export models from and run the command with no other flags (if you also want to export assets along with the models, you would simply add the
-a, --assets
flag). The command output will look something like the following:
If the command succeeds, a CloudFormation template will be saved to a folder in the local directory named cfnexport. In our example case the CloudFormation will look like the following:
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "SiteWise Export",
"Resources": {
"CNCMachineResource": {
"Type": "AWS::IoTSiteWise::AssetModel",
"Properties": {
"AssetModelName": "CNC Machine",
"AssetModelProperties": [
{
"Name": "SpindleSpeed",
"DataType": "DOUBLE",
"Unit": "RPM",
"Type": {
"TypeName": "Measurement"
},
"LogicalId": "SpindleSpeed9f2e03dd"
}
],
"AssetModelHierarchies": []
}
},
"ProductionLineResource": {
"Type": "AWS::IoTSiteWise::AssetModel",
"Properties": {
"AssetModelName": "Production Line",
"AssetModelProperties": [
{
"Name": "Location",
"DataType": "STRING",
"Type": {
"TypeName": "Attribute",
"Attribute": {}
},
"LogicalId": "Locationafc85231"
}
],
"AssetModelHierarchies": [
{
"Name": "CNC Machines",
"ChildAssetModelId": {
"Ref": "CNCMachineResource"
},
"LogicalId": "CNCMachines"
}
]
}
}
}
}
This CloudFormation template can now be launched in another region or another Amazon Web Services Account to create the same asset models we defined above.
That’s it, now you have an understanding how the export utility works. In the next section we will provide an example architecture that shows how you can integrate the utilities into your CI/CD automation pipelines.
Example CI/CD Architecture
In this example architecture we assume you have an existing CI/CD pipeline that can deploy Amazon Web Services services using CloudFormation and the Amazon Web Services SDKs.
Build
For the build stage of the architecture, the CI/CD pipeline initiates a
Deploy
In the deploy stage, the Amazon Web Services IoT SiteWise resources need to be created or modified in a specific order in the target environment, namely, asset models, assets, and dashboards. To do this,
Once the stacks are created, subsequent updates from the CI/CD pipeline will use the workflow and step functions to update those stacks which will modify and update the Amazon Web Services IoT SiteWise resources. The asset and dashboard states will wait for the previous state to finish deploying in CloudFormation before they start because they require those resources to exist before they can be created. Please see the architecture below for a visual representation.
For production workloads, customers can use CloudFormation
Conclusion
In this blog post we introduced the
About the Authors
Sebastian Salomon
is a Sr IoT Data Architect with Amazon Web Services. He has 7+ years of experience in IoT architecture in different vertical like IIoT, Automotive, O&G, Smart Home, Smart City and Mining as well as data warehousing and big data platform. In the latest years he got focus in how to bring AI to IoT through scalable MLOps platforms. As a member of Amazon Web Services Professional Services, He works with customers of different scale and industries architecting and implementing a variety of end to end IoT solutions.
|
Ashok Padmanabhan
is a Sr. IoT Data architect with Amazon Web Services Professional services focusing on Big Data Analytics & industry 4.0 solutions in Manufacturing domain.
|
Mihai Lucaciu
, with over 16 years of experience, is a Senior IoT Data Architect at Amazon Web Services Professional Services, passionately helping customers with solution architectures, designs & implementations for various projects on industrial data, edge analytics and cloud services.
|
Tim Wilson
is an IoT Enablement Specialist with Amazon Web Services’s Public Sector Partner organization. In this role Tim works with Amazon Web Services public sector partners to support their adoption and use of Amazon Web Services IoT services and solutions. He started at Amazon Web Services as a Solution Architect in 2012 when Amazon Web Services’s Public Sector business was relatively small. He has also held roles at Amazon Web Services managing an IoT prototyping lab and as a technical presenter in the Amazon Web Services Executive Briefing Center.
|
The mentioned AWS GenAI Services service names relating to generative AI are only available or previewed in the Global Regions. Amazon Web Services China promotes AWS GenAI Services relating to generative AI solely for China-to-global business purposes and/or advanced technology introduction.
Sebastian Salomon
is a Sr IoT Data Architect with Amazon Web Services. He has 7+ years of experience in IoT architecture in different vertical like IIoT, Automotive, O&G, Smart Home, Smart City and Mining as well as data warehousing and big data platform. In the latest years he got focus in how to bring AI to IoT through scalable MLOps platforms. As a member of Amazon Web Services Professional Services, He works with customers of different scale and industries architecting and implementing a variety of end to end IoT solutions.
Ashok Padmanabhan
is a Sr. IoT Data architect with Amazon Web Services Professional services focusing on Big Data Analytics & industry 4.0 solutions in Manufacturing domain.
Mihai Lucaciu
, with over 16 years of experience, is a Senior IoT Data Architect at Amazon Web Services Professional Services, passionately helping customers with solution architectures, designs & implementations for various projects on industrial data, edge analytics and cloud services.
Tim Wilson
is an IoT Enablement Specialist with Amazon Web Services’s Public Sector Partner organization. In this role Tim works with Amazon Web Services public sector partners to support their adoption and use of Amazon Web Services IoT services and solutions. He started at Amazon Web Services as a Solution Architect in 2012 when Amazon Web Services’s Public Sector business was relatively small. He has also held roles at Amazon Web Services managing an IoT prototyping lab and as a technical presenter in the Amazon Web Services Executive Briefing Center.