Using a custom workspace
Review these prerequisites before turning on asset sync.
Prerequisites
Before using Amazon IoT SiteWise, the following must be completed:
-
You have an Amazon IoT TwinMaker workspace.
-
You have assets and asset models in Amazon IoT SiteWise. For more information, see Creating asset models.
-
An existing IAM role with read permissions for the following Amazon IoT SiteWise actions:
ListAssets
ListAssetModels
DescribeAsset
DescribeAssetModel
-
The IAM role must have the following write permissions for Amazon IoT TwinMaker:
CreateEntity
UpdateEntity
DeleteEntity
CreateComponentType
UpdateComponentType
DeleteComponentType
ListEntities
GetEntity
ListComponentTypes
Use the following IAM role as a template for the required role:
// trust relationships { { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "iottwinmaker.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ] } // permissions - replace ACCOUNT_ID, REGION, WORKSPACE_ID with actual values { "Version": "2012-10-17", "Statement": [{ "Sid": "SiteWiseAssetReadAccess", "Effect": "Allow", "Action": [ "iotsitewise:DescribeAsset" ], "Resource": [ "arn:aws:iotsitewise:
REGION:ACCOUNT_ID
:asset/*" ] }, { "Sid": "SiteWiseAssetModelReadAccess", "Effect": "Allow", "Action": [ "iotsitewise:DescribeAssetModel" ], "Resource": [ "arn:aws:iotsitewise:REGION:ACCOUNT_ID
:asset-model/*" ] }, { "Sid": "SiteWiseAssetModelAndAssetListAccess", "Effect": "Allow", "Action": [ "iotsitewise:ListAssets", "iotsitewise:ListAssetModels" ], "Resource": [ "*" ] }, { "Sid": "TwinMakerAccess", "Effect": "Allow", "Action": [ "iottwinmaker:GetEntity", "iottwinmaker:CreateEntity", "iottwinmaker:UpdateEntity", "iottwinmaker:DeleteEntity", "iottwinmaker:ListEntities", "iottwinmaker:GetComponentType", "iottwinmaker:CreateComponentType", "iottwinmaker:UpdateComponentType", "iottwinmaker:DeleteComponentType", "iottwinmaker:ListComponentTypes" ], "Resource": [ "arn:aws:iottwinmaker:REGION:ACCOUNT_ID
:workspace/WORKSPACE_ID
" ] } ] }
Use the following procedure to turn on and configure Amazon IoT SiteWise asset sync.
-
In the Amazon IoT TwinMaker console
, navigate to the Settings page. -
Open the Model sources tab.
-
Choose Connect workspace to link your Amazon IoT TwinMaker workspace to your Amazon IoT SiteWise assets.
Note
You can only use asset sync with a single Amazon IoT TwinMaker workspace. You must disconnect the sync from one workspace and connect to another workspace to if you wish to sync in a different workspace.
-
Next, navigate to the workspace in which you want to use asset sync.
-
Choose Add sources. This opens the Add entity model source page.
-
On the Add entity model source page, confirm that the source field displays Amazon IoT SiteWise. Select the IAM role you created as a prerequisite for the IAM role.
-
You have now turned on Amazon IoT SiteWise asset sync. You should see a conformation banner appear at the top of the selected Workspace page confirming that asset sync is active. You should also now see a sync source listed in the Entity model sources section.