Elastic Fleets - AppBlock/Application wizard tabajara

Prepare a S3 bucket

You need to create a S3 bucket to store the VHDX, the mount script and the image file. The "populate" feature of this page will look for a structure like this:

Folder structure
AppStream needs access to the bucket you created above. Inform the bucket name with folder here: to generate a policy here, so you can add it to your bucket.
Copy JSON

To attach the policy, go to your bucket in the S3 console > Permissions tab > Bucket policy section > Click edit > and save the policy.

Create a VHD file

You can now create a VHD file as shown below. Then you need to mount > format as NTFS > and install your application to it.

Disk Management
Disk Management
You can refer to the documentation here IF you need further instructions

After you mount and format the volume as NTFS, you can install your self-contained application there as shown below.
If you don't have a layered application now, you can download a portable app like Notepad++ to test.

Disk Management

If you inform the path of your application (the way it's in the OS), I can populate the launch path on the next page for you.

Finally, after copying the apps, detach the vdisk and upload the .vhdx to your folder on S3.

Upload the icons

Just upload the PNG or JPG files associated to the programs to your folder on S3.

NotepadPlusPlus icon

You can download the icon above if you don't have one to use now.

Create and upload the VHDX mount script

Elastic Fleets need a mount script to mount your VHD to the fleet instance. You can create your own script or use my example below.

If you inform an AppBlock name: and the VHD name: you created above, I can populate the command below for you.
mkdir C:\EFApps\
$disk_number = Mount-DiskImage "C:\AppStream\AppBlocks\APPBLOCK_NAME\VHDX_NAME" -NoDriveLetter -Passthru | Get-Disk | Select -ExpandProperty Number
$partition_number = Get-Partition $disk_number | where -Property Type -ne "Reserved" | select -ExpandProperty PartitionNumber
Add-PartitionAccessPath -DiskNumber $disk_number -PartitionNumber $partition_number -AccessPath "C:\EFApps\"
Download script

This script will:

  1. create a folder name C:\EFApps\
  2. mount your VHDX with no letter
  3. get the partition created and mount to the C:\EFApps folder

Once you have the script, just upload the .ps1 file to your folder on S3 (remove the .txt extension before!).

Next step

AppBlock

AppBlock name:

VHDX location: VHDX name: Populate fields

Script location: Script name: Populate fields

Executable Path:

Executable Params: Populate parameter

Timeout in seconds:

Application

Application name:

Icon S3 location: Icon name: Populate bucket

Launch path: Populate LaunchPath

The script you copied in the previous step mounts the VHD in the C:\EFApps folder. This means that, if your application is inside a folder, it will be "C:\EFApps\folder\application.exe".

Platform:

Instance family:

Next step

Create the AppBlock and Application

At this point you should have:

You can now choose one of the options below:

Download the CloudFormation template

You can now simply download the CloudFormation template with ALL the info you need to create a AppBlock/Application combo in AppStream :)

(Optional) Using the CLI

Ok, you prefer the CLI. You will need then to follow three more steps:

  1. Inform your account number and region you want to launch your combo:
  2. AWS Account: Region:

  3. Download the JSON files for both AppBlock and Application:
  4. AND

  5. Update your AWS CLI version if you need. You can use: 'aws --version' to check:
  6. aws --version
    aws-cli/2.4.6 Python/3.8.8 # your version should be equal o higher than this
    If the CLI version is below 2.4.6, you need to update it.

  7. Finally, run the commands below to create your AppBlock and Application (so you can create your Elastic Fleet):
  8. ## If you downloaded the JSON files in the previous page, go to Downloads first
    cd $HOME\Downloads
    
    ## Then run the lines below
    aws appstream create-app-block --cli-input-json file://AppBlockConfig.json --region YOUR_REGION  # creates an AppBlock
    aws appstream create-application --cli-input-json file://ApplicationConfig.json --region YOUR_REGION  # creates an Application
    
You may get AccessDenied if your user doesn't have CreateAppBlock and CreateApplication permissions.
If you need to add, I can generate a policy for you to attach to your user.
Copy JSON