Amazon AppStream 2.0
Developer Guide

Stacks and Fleets

Amazon AppStream 2.0 uses stacks and fleets to stream instances, and manage user access policies and storage configurations. You create stacks and fleets as part of the streaming configuration process. For more information, see Getting Started with Amazon AppStream 2.0 and Set up AppStream 2.0 Stacks and Fleets.


An AppStream 2.0 stack consists of user access policies that control access to the fleet associated with the stack. You can create a new stack by choosing Stacks, Create Stack.

The following actions can be performed on a stack in the AppStream 2.0 console.

Create streaming URL

Create a URL for a user to stream applications. This action can only be performed if a running fleet is associated with the stack, and the fleet doesn't have a Directory Config specified.

Associate fleet

Associate an existing fleet with the stack. To stream user applications, the stack must have an associated fleet. This action cannot be performed on a stack that already has an associated fleet. First, disassociate the associated fleet and then associate the desired fleet with the new stack.

Disassociate fleet

Disassociate the associated fleet from the stack.


Delete the stack. This action cannot be performed on a stack that has an associated fleet. First, disassociate the fleet from the stack and then delete the stack. You must stop the disassociated fleet to avoid being charged for resources running as a part of that fleet.

You can also view stack details, or choose storage to enable or disable Home Folders for the stack. For more information, see Persistent Storage with AppStream 2.0 Home Folders.


An AppStream 2.0 fleet is a group of streaming instances from which user applications are executed and streamed. You can create a new fleet by choosing Fleets, Create Fleet.

The following actions can be performed on a fleet in the AppStream 2.0 console.


Delete all resources in a fleet. This action cannot be performed on a running, stopping, or starting fleet.


Edit the fleet parameters. The parameters available for editing depends on the current status of the fleet.

Fleet Status Editable Fields
RUNNING Display Name, Desired Capacity, Image, Disconnect Timeout
STOPPED Display Name, Desired Capacity, VPC, Subnets, Directory Name, Organizational Unit (OU), Image, Disconnect Timeout, Instance Type, Security Group(s)

Start the desired number of instances in the fleet.


Stop all instances in the fleet.

Passing Command Line Parameters to Applications Using Session Context

You can pass command line parameters dynamically by launching your streaming session with the AWS CLI. This parameter is passed via session context to the streaming URL.

To pass a parameter to a batch script

  1. Connect to your image builder in ImageBuilderAdmin mode. For this example, install the Google Chrome application on the image builder.

  2. Create a new folder under C:\. For this example, name the folder "Scripts".

  3. Create a batch script under the new folder. In this example, use a script that launches Chrome and then waits for keyboard input before closing the script window. Chrome launches with a URL passed as a command line parameter to the batch script.

    Example session-context-test.bat script:

    chrome.exe %1 pause
  4. In Image Assistant, add session-context-test.bat and change the working directory parameter to C:\Program Files (x86)\Google\Chrome\Application.

  5. Create an image, fleet, and stack. For this example, the fleet and stack names are session-context-test-fleet and session-context-test-stack, respectively.

  6. After the fleet is running, you can create a streaming URL using the AWS CLI session-context parameter. You can modify the example below to match your specific requirements.

    aws appstream create-streaming-url –fleet-name session-context-test-fleet –stack-name session-context-test-stack –user-id username –validity 10000 –application-id chrome –session-context ""

If everything is set up correctly, browsing to the streaming URL results in the batch script launching Chrome and loading