I am trying to access the filesystem I implemented in Amazon FSx for Windows Server by creating and configuring the DNS alias since the default filesystem DNS name given by Amazon does not speak much. Therefore, it is an alternative good way if we do not want to configure that using the DFS namespace.
Below are the steps to create a DNS CNAME record:
Note this is Step 2 after creating/update the SPN.
1. Open PowerShell as administrator on the server with a priviliged accounts which has DNS administration permissions.
2. Run the below command :
3. To update or create a custom DNS name to the Amazon FSx file system, use the below command by replacing the dns alias and filesystem dns name :
$DnsServerComputerName = (Resolve-DnsName $ZoneName -Type NS | Where Type -eq 'A' | Select -ExpandProperty Name)
Add-DnsServerResourceRecordCName -Name $AliasHost -ComputerName $DnsServerComputerName -HostNameAlias $FSxDnsName -ZoneName $ZoneName
You have now added a DNS CNAME value for your Amazon FSx file system with the DNS alias. You can now use the DNS alias to access your data.