AWS Builder Center

Managing WorkSpaces Personal DNS on Existing Windows WorkSpaces

Modifying AD Connector DNS servers normally requires a rebuild of existing WorkSpaces to deploy the change. This article shows how to change this at the OS level without any disruption.

Series: AD Connector and WorkSpaces (4 articles)

  1. 2
    Managing WorkSpaces Personal DNS on Existing Windows WorkSpaces This article

Managing WorkSpaces DNS on Existing Windows WorkSpaces (No Rebuild)




Background: how WorkSpaces pin the AD Connector's DNS

When using AD Connector, the directory requires you to specify DNS servers. These are the initial DNS servers used for the SRV lookups that discover LDAP and Kerberos services.
The key behavior: for WorkSpaces, these DNS servers are hard-defined on the customer VPC network adapter ( eth1 ) based on the value of the setting at the time the WorkSpace was built. On Windows, that value is hard-coded to the  DomainJoinDns   REG_SZ  value in the registry key  HKLM:\SOFTWARE\Amazon\Skylight .
This value is not updated when you change the AD Connector's DNS settings, and VPC DHCP Option Sets do not change it either. Every time the Skylight service starts, it reads this value and sets the DNS of  eth1  to match it.
This means that to switch the DNS servers your AD Connector uses, you have two options with regard to WorkSpaces:
  1. Rebuild the WorkSpaces after the new value is set on the AD Connector. This is highly disruptive.
  1. Update the  DomainJoinDns  value on each WorkSpace and restart the Skylight service (or reboot Windows — either is fine), then switch the DNS servers in the AD Connector console. This is the preferred option — it requires no disruptive actions and can be pushed fleet-wide.
Do this one DNS-server change at a time, during off-peak, and avoid launching WorkSpaces within ~15 minutes of the change (the AD Connector re-discovery interval).



Step 1 — Inspect the current value

PS C:\Windows\system32> Get-ItemProperty -Path HKLM:\SOFTWARE\Amazon\SkyLight -Name DomainJoinDns
DomainJoinDns : 10.3.0.57,10.3.1.33
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Amazon\SkyLight
PSChildName : SkyLight
PSDrive : HKLM



Step 2 — Update it (single machine)

Set-ItemProperty -Path HKLM:\SOFTWARE\Amazon\SkyLight -Name DomainJoinDns -Value "10.3.0.57,10.3.1.33"
# Restart Skylight to re-pin eth1 DNS (or simply reboot Windows):
Restart-Service -Name SkyLightWorkSpacesConfigService
The  DomainJoinDns  value is a comma-separated list of DNS server IPs. On the next Skylight service start (or reboot), Skylight re-reads it and applies it to  eth1 .



Step 3 — Fleet-wide (recommended)

Push this registry value across your entire fleet with Group Policy Preferences — a registry-value item targeting  HKLM:\SOFTWARE\Amazon\Skylight\DomainJoinDns . The full non-disruptive change is then a two-step process:
  1. Update DNS settings via the Group Policy Preference (and restart Skylight / reboot to apply).
  1. Switch the DNS servers in the AD Connector console.



Verify

After the service restart or reboot, confirm  eth1  is using the new servers:
Get-DnsClientServerAddress -InterfaceAlias "Ethernet 2" # eth1 (customer NIC)
Resolve-DnsName <hostname-in-your-domain>
(The customer NIC is typically shown as "Ethernet 2" in Windows; confirm with  Get-NetAdapter .)

Series: AD Connector and WorkSpaces (4 articles)

  1. 2
    Managing WorkSpaces Personal DNS on Existing Windows WorkSpaces This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article