Integrate Amazon IoT SiteWise and Amazon IoT TwinMaker
Integrating with Amazon IoT TwinMaker grants access to robust functionality in Amazon IoT SiteWise, such as Amazon IoT SiteWise data retrieval ExecuteQuery
API
and advanced asset search in the Amazon IoT SiteWise console. To integrate the services and use these features, you must first enable the integration.
Enabling the integration
Administrators can use Amazon JSON policies to specify who has access to what. That is, which principal can perform actions on
what resources, and under what conditions. The Action
element of a JSON policy describes the actions that you can use
to allow or deny access in a policy. For more information about Amazon IoT SiteWise supported actions, see Actions defined by Amazon IoT SiteWise in the
Service Authorization Reference.
For more information about Amazon IoT TwinMaker service-linked role, see Service-linked roles for Amazon IoT TwinMaker in the Amazon IoT TwinMaker User Guide.
Before you can integrate Amazon IoT SiteWise and Amazon IoT TwinMaker, you must grant the following permissions that allow Amazon IoT SiteWise to integrate with an Amazon IoT TwinMaker linked workspace:
-
iotsitewise:EnableSiteWiseIntegration
– Allows Amazon IoT SiteWise to integrate with a linked Amazon IoT TwinMaker workspace. This integration allows Amazon IoT TwinMaker to read all your modeling information in Amazon IoT SiteWise through an Amazon IoT TwinMaker service-linked role. To enable this permission, add the following policy to your IAM role:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iotsitewise:EnableSiteWiseIntegration" ], "Resource": "*" } ] }
Integrating Amazon IoT SiteWise and Amazon IoT TwinMaker
To integrate Amazon IoT SiteWise and Amazon IoT TwinMaker, you must have the following:
Amazon IoT SiteWise service-linked role set up in your account
Amazon IoT TwinMaker service-linked role set up in your account
Amazon IoT TwinMaker workspace with ID
IoTSiteWiseDefaultWorkspace
in your account in the Region.
To integrate by using the Amazon IoT SiteWise console
When you see the Integration with Amazon IoT TwinMaker banner in the console, choose Grant permission. The prerequisites are created in your account.
To integrate by using the Amazon CLI
To integrate Amazon IoT SiteWise and Amazon IoT TwinMaker by using the Amazon CLI, enter the following commands:
-
Call
CreateServiceLinkedRole
with anAWSServiceName
ofiotsitewise.amazonaws.com
.aws iam create-service-linked-role --aws-service-name iotsitewise.amazonaws.com
-
Call
CreateServiceLinkedRole
with anAWSServiceName
ofiottwinmaker.amazonaws.com
.aws iam create-service-linked-role --aws-service-name iottwinmaker.amazonaws.com
-
Call
CreateWorkspace
with anID
ofIoTSiteWiseDefaultWorkspace
.aws iottwinmaker create-workspace --workspace-id IoTSiteWiseDefaultWorkspace