Amazon WorkSpaces Applications and Application Auto Scaling
You can scale WorkSpaces Applications fleets using target tracking scaling policies, step scaling policies, and scheduled scaling.
Use the following information to help you integrate WorkSpaces Applications with Application Auto Scaling.
Service-linked role created for WorkSpaces Applications
The following service-linked role is automatically created in your Amazon Web Services account when registering WorkSpaces Applications resources as scalable targets with Application Auto Scaling. This role allows Application Auto Scaling to perform supported operations within your account. For more information, see Service-linked roles for Application Auto Scaling.
-
AWSServiceRoleForApplicationAutoScaling_AppStreamFleet
Service principal used by the service-linked role
The service-linked role in the previous section can be assumed only by the service principal authorized by the trust relationships defined for the role. The service-linked role used by Application Auto Scaling grants access to the following service principal:
-
appstream.application-autoscaling.amazonaws.com
Registering WorkSpaces Applications fleets as scalable targets with Application Auto Scaling
Application Auto Scaling requires a scalable target before you can create scaling policies or scheduled actions for an WorkSpaces Applications fleet. A scalable target is a resource that Application Auto Scaling can scale out and scale in. Scalable targets are uniquely identified by the combination of resource ID, scalable dimension, and namespace.
If you configure auto scaling using the WorkSpaces Applications console, then WorkSpaces Applications automatically registers a scalable target for you.
If you want to configure auto scaling using the Amazon CLI or one of the Amazon SDKs, you can use the following options:
-
Amazon CLI:
Call the register-scalable-target command for an WorkSpaces Applications fleet. The following example registers the desired capacity of a fleet called
sample-fleet, with a minimum capacity of one fleet instance and a maximum capacity of five fleet instances.aws application-autoscaling register-scalable-target \ --service-namespace appstream \ --scalable-dimension appstream:fleet:DesiredCapacity \ --resource-id fleet/sample-fleet\ --min-capacity1\ --max-capacity5If successful, this command returns the ARN of the scalable target.
{ "ScalableTargetARN": "arn:aws-cn:application-autoscaling:region:account-id:scalable-target/1234abcd56ab78cd901ef1234567890ab123" } -
Amazon SDK:
Call the RegisterScalableTarget operation and provide
ResourceId,ScalableDimension,ServiceNamespace,MinCapacity, andMaxCapacityas parameters.
Related resources
For more information, see Fleet Auto Scaling for Amazon WorkSpaces Applications in the Amazon WorkSpaces Applications Administration Guide.