DEV Community

amalkabraham001 for AWS Community Builders

Posted on

Introduction to AWS Appstream 2.0 and steps to configure Appstream service

AWS Appstream 2.0 is a fully managed App streaming service from AWS which allows users to stream the business applications from any device. Consider AWS Appstream as an alternative solution for Citrix XenApp. You pay for the resources you use and a small license fee(~$5) for the Remote desktop CAL.

A generic question which comes to mind is does Appstream supports multiple users/Appstream server?.The answer is NO. Appstream creates 1 instance/user/stack.So if we have 100 users, appstream will create 100 instances.

Appstream Architecture

AWS Architecture
image courtesy:- AWS Blogs.
In the Appstream architecture, the fleets or app streaming servers are located and managed by AWS however it is integrated to customer aws account via the elastic network interfaces.
There are three types of Appstream fleets .
Always ON:-This fleet type will provide users instant-on access to their apps. You will be charged for all running instances in your fleet even if no users are streaming apps.
OnDemand:-on-demand fleet, users will experience a start time of about one to two minutes for their session. However, you will only be charged the streaming instance fees when users are connected, and a small hourly fee for each instance in the fleet that is not streaming apps.
Elastic Fleets:-elastic fleet don’t require installation and can be run from a virtual hard disk. Elastic fleets don’t support AppStream 2.0 images, nor do they require scaling policies. You are charged only for the duration of a streaming session.

Let us see how to configure Appstream to stream some of the business applications to users.

Appstream service consists of the below components: –

Fleet: – Collection of servers from where the Application is getting streamed

Stack: – A combination of Fleet plus user Policies

Images: – The App stream images where the streamed applications were deployed. You have options to select AWS owned Appstream images or you can create custom Appstream images with the help of Image builder.

The steps to create your custom Appstream Image will be described in a separate blog post.

Directory Config: – You can integrate your Appstream fleet servers into the Active directory. This is optional and your Appstream can function without corporate AD integration

User Pools: – The place where we can create users and assign them to stacks.
Let us take a deep dive on how to create the appstream 2.0 environment.

CREATING FLEET

Navigate to Appstream 2.0 service and click on Fleet.
Click on “Create Fleet” to start creating the fleet.
We need to select the fleet type which we need to use.

Image description

There are three kinds of AWS fleets.

Always-on:- Select this fleet type to provide users instant-on access to their apps. You will be charged for all running instances in your fleet even if no users are streaming apps.

On-demand:-Select this fleet type to optimize your streaming costs. With an on-demand fleet, users will experience a start time of about one to two minutes for their session.

Elastic:-Select an elastic fleet for applications that don’t require installation and can be run from a virtual hard disk.

Image description
Select on-demand as the fleet type and click on next.

In the “fleet details”, Provide a name for your fleet, a display name and description.
Image description
In the “Choose instance type” option select the VM family for your fleet instances. For this demo, I am selecting general purpose “stream.standard.medium” which is equal to t2.medium instance size in EC2.
Image description
In the “User session details” select the maximum session duration, disconnect timer and idle timeout settings for users.
Image description
In the “fleet capacity“, select the minimum and maximum capacity for your fleet.
Image description
In the “stream view details“, select whether you need to publish application or a full desktop to user.
Image description
You can configure scale in and scale out in the “Scaling details-advanced” option.
Image description
Configure IAM option if your fleet need password less communication to any other AWS services.

Configure tags if needed and click on next.

In the “Choose an image” tab, select the image you need to use for your fleet servers. The image need to contain the applications which need to be streamed to the users. I am writing a dedicated blog which only talks about how to create a custom streaming image.

Image description
Once you select your image, click on next

In the configure network tab, select whether your fleet instances need internet access or not. Check the box “Enable default internet access” if you need direct internet connectivity from fleet to internet.
Image description
Select the VPC and subnets where you are going to deploy the fleet instances. You need to select minimum 2 subnets as the fleets will automatically load balanced across AZs.

Choose your active directory domain if configured already, else it is purely optional.
Image description

Click Next to review the settings and click on create to create your fleet.
Image description
Confirm to create the Fleet
Image description
Image description

CREATING THE STACK

As I mentioned earlier, App stack is a combination of your fleet as well as user policies. Click on stack and “create stack” .
Image description
In the stack details, provide the name, display name and description for your stack. You can also provide a redirect URL and feedback URL as optional. For example, you can redirect the users to your corporate SharePoint once the appstream is ended and point them to a survey URL where they can provide the feedback about the Appstream experience.
Image description
You can configure VPC endpoints as optional. Click on Next
Image description
In the “Enable Storage” tab, you can select to map the home folder, google drive and OneDrive for business for the user session. The home folders will be configured in an S3 bucket. You can configure your G suite domain and Onedrive for business domain as well. For this demo, i am enable home folders and OneDrive for business for my test user.
Image description
Image description
Click Next once you configure it.

In the “Edit User settings” select whether you need to redirect the user clipboard, allow file transfer between Appstream session and your local endpoint, printer redirection etc.
Image description
You need to select either password authentication or smart card authentication or both.

In the “Application setting persistence” , check the box to enable the app settings persistence option which is basically a roaming profile concept where your application settings will be retained to an S3 bucket.

Image description
Click Next

In the Review and Create tab, review the settings you configured and Click on “Create stack” to create your stack.

CREATING USER POOL

User pool as the name suggest, is a place where we can create Appstream users and publish stack to user.

Click on User pools and select “Create User“
Image description
Provide the email address, first name and last name and click on “Create User“
Image description
Image description

EMAIL CONFIRMATION TO USER WITH USER NAME AND PASSWORD

The end user will get an email with instructions as shown in the below diagram.
Image description

ACCESSING THE APPSTREAM APPS AS AN END USER

Click on the link to access the Appstream login page. provide the user name and password to access the applications.
Image description
I got a password change prompt and asked me to provide a new password in my first login.

Once I authenticated to the Appstream, I got a notification stating that no Application is available for the user. This error happened because I haven’t configured entitlement.
Image description
Click on the stack and navigate to entitlement ,and click on “Create entitlement”
Image description
Provide Name, description and select attribute mapping where we can map a user type/department to publish a set of applications.
Image description
From the “Application settings“, select whether you need to present all applications or selected applications which will be given to the users.
Image description
Once the entitlement is configure, I relogged into the user portal and can view my published streamed applications.
Image description
Click on the application you need to open. Hence I provisioned an on-demand fleet, it took some time for my application to launch.
Image description
Finally my notepad++ has launched without issues.
Image description
I have tested clipboard copy paste from my local laptop to Appstream notepad++ application.

I opened a notepad and typed some text in my laptop.I can successfully paste the text to my Appstream session.

Image description
The usage of fleet instances can be viewed from the “fleet usage” option from your fleet.
Image description
Hope this blog is useful to you. You can check my blogs on VDI and Azure world.

VDI Tech Blogs

favicon amalcloud.wordpress.com

Oldest comments (0)