Using service-linked roles for WorkSpaces Thin Client - Amazon WorkSpaces Thin Client

Using service-linked roles for WorkSpaces Thin Client

Amazon WorkSpaces Thin Client uses AWS Identity and Access Management (IAM) service-linked roles. A service-linked role is a unique type of IAM role that is linked directly to WorkSpaces Thin Client. Service-linked roles are predefined by WorkSpaces Thin Client and include all the permissions that the service requires to call other AWS services on your behalf.

A service-linked role makes setting up WorkSpaces Thin Client easier because you don’t have to manually add the necessary permissions. WorkSpaces Thin Client defines the permissions of its service-linked roles, and unless defined otherwise, only WorkSpaces Thin Client can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.

You can delete a service-linked role only after first deleting their related resources. This protects your WorkSpaces Thin Client resources because you can't inadvertently remove permission to access the resources.

For information about other services that support service-linked roles, see AWS services that work with IAM and look for the services that have Yes in the Service-linked roles column. Choose a Yes with a link to view the service-linked role documentation for that service.

Service-linked role permissions for WorkSpaces Thin Client

WorkSpaces Thin Client uses the service-linked role named AWSServiceRoleForAmazonWorkSpacesThinClientMonitoring. This role allows Amazon WorkSpaces Thin Client to publish metrics to CloudWatch on your behalf.

The AWSServiceRoleForAmazonWorkSpacesThinClientMonitoring service-linked role trusts the following services to assume the role:

  • monitoring.thinclient.amazonaws.com

The role permissions policy named AmazonWorkSpacesThinClientServiceRolePolicy allows WorkSpaces Thin Client to complete the following actions on the specified resources:

  • Action: Use cloudwatch:PutMetricData on CloudWatch metrics in the AWS/WorkSpacesThinClient and AWS/Usage namespaces

    Note

    You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information see AWS managed policy: AmazonWorkSpacesThinClientFullAccess.

    Make sure you have the following permissions enabled:

    { "Sid": "AllowCreateServiceLinkedRole", "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "arn:aws:iam::*:role/aws-service-role/monitoring.thinclient.amazonaws.com/AWSServiceRoleForAmazonWorkSpacesThinClientMonitoring", "Condition": { "StringEquals": { "iam:AWSServiceName": "monitoring.thinclient.amazonaws.com" } } }

    For more information, see Service-linked role permissions in the IAM User Guide.

Creating a service-linked role for WorkSpaces Thin Client

You don't need to manually create a service-linked role. When you create your environment in the AWS Management Console, the AWS CLI, or the AWS API, WorkSpaces Thin Client automatically creates the service-linked role if it doesn't already exist.

If you delete this service-linked role, and then need to create it again, you can use the same process. When you create an environment, WorkSpaces Thin Client will create the service-linked role if it's not present in your account.

Editing a service-linked role for WorkSpaces Thin Client

WorkSpaces Thin Client does not allow you to edit the AWSServiceRoleForAmazonWorkSpacesThinClientMonitoring service-linked role. You cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see Editing a service-linked role in the IAM User Guide.

Deleting a service-linked role for WorkSpaces Thin Client

If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must clean up the resources for your service-linked role before you can manually delete it.

Cleaning up a service-linked role

Before deleting the AWSServiceRoleForAmazonWorkSpacesThinClientMonitoring role, you must delete all WorkSpaces Thin Client environments in your account, see instructions to delete environment at Deleting an environment.

Note

If the WorkSpaces Thin Client service is using the role when you try to delete the resources, then the deletion might fail. If that happens, wait for a few minutes and try the operation again.

Use the IAM console, the AWS CLI, or the AWS API to delete the AWSServiceRoleForAmazonWorkSpacesThinClientMonitoring service-linked role. For more information, see Deleting a service-linked role in the IAM User Guide.

Supported Regions for WorkSpaces Thin Client service-linked roles

WorkSpaces Thin Client supports using service-linked roles in all of the Regions where the service is available. For more information, see AWS Regions and endpoints.

WorkSpaces Thin Client does not support using service-linked roles in every Region where the service is available. You can use the AWSServiceRoleForAmazonWorkSpacesThinClientMonitoring role in the following Regions.

Region name Region identity Support in WorkSpaces Thin Client
US East (N. Virginia) us-east-1 Yes
US West (Oregon) us-west-2 Yes
Asia Pacific (Mumbai) ap-south-1 Yes
Canada (Central) ca-central-1 Yes
Europe (Frankfurt) eu-central-1 Yes
Europe (Ireland) eu-west-1 Yes
Europe (London) eu-west-2 Yes