Amazon WorkSpaces is awesome but when implementing large client deployments asking all the users to type in their registration code is not going to cut it. The registration code instructs the WorkSpaces client where to connect. Here’s some ways to configure this automatically.

registrationCache.json

The registrationCache.json file lets us populate some settings for the Amazon WorkSpaces client.

[
    {
        "externalRegion": "Asia Pacific (Sydney)",
        "registrationCode": "wssyd+VANQWU"
    }
]

As you can see, this file specifies the Region and the Registration Code. Now you can create this file manually or what I usually do is configure the registration code in the client then take a copy of it for deployment.

  1. Type in the Registration Code
  2. Click Register

On Windows 10, you can find the registrationCache.json file located in %userprofile%\appdata\Local\Amazon Web Services\Amazon WorkSpaces

Deploying with Group Policy

Now you can deploy this registrationCache.json file anyway you want (SCCM, login scripts, etc), today I’m going to cover deploying the file with Group Policy.

  1. Copy the registrationCache.json file somewhere readable by all users (file server, NETLOGON, etc)

  2. Create a new Group Policy Object (or reuse an appropriate existing GPO)

  3. Under User Configuration > Preferences > Windows Settings > Files > (Right Click) New > File

  4. New File Properties:

    • General Tab:

      • Action: Replace (You can set the action appropriate to you need here)

      • Source File: Where you put the registrationCache.json

      • Destination File: %userprofile%\appdata\Local\Amazon Web Services\Amazon WorkSpaces\registrationCache.json (Once again, this is the location for Windows 10, change it to where you found this file when configuring it by the client)

    • Common Tab:

      • Check: Run in logged-on user’s security context

      • Enable: Remove this item when it is no longer applied (optional)

  5. Link the GPO where appropriate in your Group Policy OU structure

  6. Give it a test

Custom Uniform Resource Identifiers (URIs)

URIs are basically special application links that can be used to open the application and pass information to it.

Amazon WorkSpace URIs can do some special things such as:

  • Configure the Registration Code
  • Pre-enter the user name

The following URI will configure the registration code for us:

workspaces://@wssyd+VANQWU

For more information around URIs and the Amazon WorkSpaces client, the Amazon WorkSpaces Administration Guide can help