How do you deploy an app?

Go into AppStream’s Image Builder –> Build Custom Image (Put Adobe, Wordpad, firefox..whatever apps you like).

Can I domain join the app stream instances with Active Directory?

Yes. This can be done during the app definition or the FLEET definition process (see below).

What is a FLEET?

Once an app is built and tested, you need to build a FLEET from the custom image. This too, can be domain joined.

App Stream Users, Instances, Fleets and Stacks

Each Stack can have multiple fleets (images). So – each stack can contain multiple APPS (Adobe, Revvit, etc..)

How does AppStream Scale in or Scale out?

Scale in and Scale out is automatic if you don’t define any custom metrics. Set a MIN and a MAX value within the AppStream Stack Definition.

Custom AppStream Scale in And Scale Out Policies

First, you need to understand the difference between  Actual capacity and Capacity Utilization – E.g. ActualCapacity may be 2 and CapacityUtilization may still be  ZERO percent.

Look under Fleet Usage (Fleet Details) –> ActualCapacity in blue on the left axis. CapacityUtilization, the percentage of capacity in use, is in brown on the right axis.

The metric should be based on Capacity Utilization.

Manual scaling example  – For a new Scale In Policy –> If Capacity Utilization is LESS than 25% of the fleet capacity, Scale in 1 instance.

Auto Scaling – As mentioned above, Auto Scaling can handle scaling for you (above example was manual scaling policy).

Tip: Set the minimum capacity to zero, to incur no charges when no instances are being used

aws application-autoscaling register-scalable-target
–service-namespace appstream \
–resource-id fleet/fleetname \
–scalable-dimension appstream:fleet:DesiredCapacity \
–min-capacity 0 –max-capacity 5

Can you scale down to ZERO instances?

Set min capacity to ZERO if you want to scale down to zero instances, as shown above.

AppStream Quotas

AWS limits the number of fleets, in case your user base goes crazy and spins up hundreds of instances. The default limit is 10, but a quota increase is easy to request.

Resource Default Quota
Stacks 10
Fleets 10

AppStream Fleet allow conditional usage, Limit a USER to X hours a day

To limit the usage of end  users, one creates a Scheduled Scaling Policy. This policy allows automatic spin up and spin down of appstream instances.

How do I view all the Existing Scaling Policies

The only way to do this is via the aws cli (To install the CLI on a linux machine

sudo apt-get install awscli

Once installed, use the following command to describe / view existing auto scaling policies.

aws application-autoscaling describe-scaling-policies –service-namespace appstream  fleet/HPRHS-Apps

Shut Down AppStream Fleet after a certain hour?

The same as above – set a Scheduled Scaling Policy

License Server for Apps on AppStream?

This is a common use case. How do you license all instances and keep the licenses up to date?

You need to configure a separate EC2 instance to serve as your license server. To follow the step by step guide, go through this AutoCad example of setting up a License Server.

How do I set up SAML federation to my AppStream Stack?

Read this blog post that I wrote around federating users from gSuite to AWS AppStream. It will specifically point out the steps that may be potential blockers.

Summary

While AWS’ appstream documentation  helpful, there were a few areas where I encountered missing or outdated documentation – especially around the scaling policies, scheduled policies and license server setup. This post helps to bridge some of those gaps.

Next Steps?

Need help with your AppStream efforts? Start the conversation today.  

Anuj holds professional certifications in Google Cloud, AWS as well as certifications in Docker and App Performance Tools such as New Relic. He specializes in Cloud Security, Data Encryption and Container Technologies.

Initial Consultation

Anuj Varma – who has written posts on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.