Configuring DNS services in AWS

Configuring DNS services in AWS

In the last blog post, I wrote about how we can configure Active Directory Domain Service in the Azure Cloud. So this time I decided to focus on AWS and walk through the steps that are needed when you are facing the following two scenarios:

  1. Configuring a custom Active Directory(AD) domain and DNS servers for instances running in your AWS Virtual Private Cloud(VPC).
  2. Extending your on-premises AD and DNS servers to your AWS VPC.

So, let’s start with the first scenario. In this scenario, all your instances are running in your AWS VPC.

  1. Navigate to your VPC using the AWS Management console and change or verify the Edit DNS Resolution and Edit DNS Hostname settings to Yes.
    Screen Shot 2017-08-14 at 10.56.00 PM
  2. Now, navigate to the Route53 section in your account and click on Create Hosted Zone. Enter the custom Domain name and select Private Hosted Zone for Amazon VPC from the Type drop down box, and then select your VPC ID. Click Create to create the new Internal Hosted Zone.
    Screen Shot 2017-08-14 at 10.59.02 PM.png
  3. Now that you have your own internal hosted zone in Route53, you can start creating Record Sets for your instances. Enter a name and the private IP address for your instance and click Create.
  4. To test that this works, you can log into any one of your instances and try to do a nslookup. You should see your internal hosted zone along with the .2 IP address from your subnet which represents that you are still using the AWS provided Route53 DNS servers.
  5. You can create similar record sets for all the instances that you want to manage in your hosted zone and start using hostnames for communicating between your instances.

Now, let’s move on to the second scenario. In this case, we won’t be able to use the DNS Servers provided by Route53, as they have a strict requirement that the traffic should originate from inside your AWS Account. Complete the following steps if you want to use your on-premises DNS servers for your instances running in your AWS Account.

  1. First, we need to make sure that you have a VPN connection set up between your on-premises environment and your Amazon VPC. This is required to ensure that all the instances in your VPC are able to reach your on-prem DNS Servers.
  2. Next, navigate to the VPC section in your AWS management console, and click on the DHCP Options Sets in the left column.
  3. Click on Create DHCP Options Set, and enter a Name tag, Domain Name and Domain Name Server details for your On-Prem DNS Servers. You can optionally enter your NTP Servers, NetBIOS name servers, and NetBIOS Node type details.
    Screen Shot 2017-08-14 at 11.14.08 PM
  4. Click on Yes, Create.
  5. Now, go back to your VPC and click on Actions and Edit DHCP Options Set.
  6. Select the new DHCP Options Set that you created in the previous steps and click Save.
    Screen Shot 2017-08-14 at 11.17.09 PM
  7. The final step is to reboot your existing instances to reflect the changes that you just made. An important point to note is that going forward your Route53 DNS Servers won’t work for these instances, so if you lose connectivity with your on-prem DNS Servers, your instances won’t be able to resolve any hostnames.

Hopefully, the screen shots and the steps listed in this blog post help you easily maneuver through the task of configuring DNS Services in the AWS Cloud.


One thought on “Configuring DNS services in AWS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s