Running custom DNS on EC2 instances

amazon ec2amazon-web-servicesinternal-dns

I am trying to design a Enterprise Hybrid DNS architecture, similar to this blog article:
https://medium.com/statuscode/hybrid-dns-for-the-enterprise-in-aws-5ba5a049bcb1

In summary there is an on-premise DNS zone(e.g. example.com) and a Route53 private hosted zone(e.g. cloud.example.com).

The goal is to run a custom DNS service using Bind DNS in AWS. Using DHCP options to point all EC2 instances to use the custom DNS services and have forwarders from inside to these custom DNS services. All the above is working as expected.

My concern is using the private IP address of the EC2 instances in the DHCP options as the EC2 instance could be terminated and IP is lost.
In addition, I would like to be able to scale vertically and add additional Bind DNS servers.

How can I create a load balancer in AWS for DNS services that has a fixed IP address that I can add to the DHCP options?

Best Answer

This should be possible with a Network Loadbalancer, balancing port 53 tcp AND 53 udp. Add your DNS Servers to a Target Group, and point the Network Loadbalancer towards that Target Group.

But I'd also sugesst to use NS glue records pointing to route53 NS or route53 VPC internal NS.