By Paul Wilson

Since Peter and I first introduced a CloudFormation template in the blog  “Jumpstarting your XenDesktop Farm in AWS with a CloudFormation Template,” we have received numerous requests from readers to update the template to support multiple Regions and Availability Zones. In recent weeks we’ve been laying the groundwork to satisfy these requests — copying the appropriate Amazon Machine Images (AMIs) to all the Regions and updating the CloudFormation JSON template to use the newly copied AMIs in each Region. These AMIs have also been updated to tackle some of the timeout issues that were seen with the originals AMIs.

Today we are announcing the second version of our AWS CloudFormation template with multi-region availability and a simplified installation script. This release allows readers everywhere to build a XenDesktop farm with hosted shared desktops (XenApp) in the Amazon AWS cloud easily and quickly.

Version 2.06 of the CloudFormation JSON template can be downloaded from here and includes access to the two new AMIs. This version of the template requires an additional region-specific parameter, AvailabilityZonePref, which is required. We had previously released version 2.05 but this latest version (2.06) shows the correct casing for the naming of the various availability zones. The previous JSON template showed everything in upper-case with the accompanying example.

This new parameter specifies the Availability Zone (AZ) in a selected Region. The parameter is necessary because sometimes all of the required resources are not available within an AZ, so at run-time Amazon returns a list of AZs to try that feature the required resources. The list of valid AZs is always subject to change. At the time this blog was written, however, the following AZs were available in each Region. Note also that the casing is import. Use therefore the names as shown in the below table for your preferred Availability Zone.

Region Current Availability Zones
US-EAST-1 us-east-1a, us-east-1b, us-east-1c, us-east-1d
US-WEST-1 us-west-1a, us-west-1c
US-WEST-2 us-west-2a, us-west-2b, us-west-2c
EU-WEST-1 eu-west-1a, eu-west-1b, eu-west-1c
SA-EAST-1 sa-east-1a, sa-east-1b
AP-SOUTHEAST-1 ap-southeast-1a, ap-southeast-1b
AP-NORTHEAST-1 ap-northeast-1a, ap-northeast-1b, ap-northeast-1c

The easiest way to generate the current list valid AZs in a Region is to go to the EC2 Dashboard screen and navigate to the Region’s EC2 console, as highlighted in the screenshot below.

In most cases, using zone A in a Region will be sufficient. If you are unsure of which AZ to choose, select the region’s A zone. Since there is a wide range of potential AZs and no way to validate them in advance at the time the parameter is provided to the CloudFormation template, you must first verify that the specified AZ is indeed correct.  When I tested each of the Region images, I used zone A by default for all Regions except US-EAST-1 (because that AZ was resource-constrained) and instead used US-EAST-1C.

If the AvailabilityZonePref parameter that you specify does not represent a valid AZ, the template script executes for a few minutes and then rolls back so that you can try again. -:)

For detailed instructions on using the v2 CloudFormation template, download the setup guide here

Using this new template, in only a couple of hours you’ve constructed a XenDesktop farm in your selected Region within the AWS cloud. Ready to publish hosted shared desktops and applications. You can use the farm for a number of purposes, including:

  • Application Testing
  • Business Continuity
  • Proof-of-Concept
  • Testing XenApp performance in the cloud
  • Learning how to manage AWS resources

We welcome your comments and feedback about our new Multi-Region AWS CloudFormation template for XenDesktop.