I would like to migrate my domain DNS from AWS Route 53 to CF- however I’m a little confused about how to deal with a top-level/zone apex ALIAS record in our existing Route 53 config. Route 53 ALIAS record is similar to CNAME except it is an AWS construct which allows a DNS record to point directly at an AWS resource- in my case it’s pointing to an ELB (elastic load balancer). So the set up in my Route 53 currently looks like this:
mydomain.com ALIAS —> dualstack.mydomain-loadbalancer.us-east-1.elb.amazonaws. com (loadbalancer hostname)
The reason I’m confused is because CF auto-populated the DNS entries for this top level domain to look like this:
A mydomain. com points to 220.127.116.11
A mydomain. com points to 18.104.22.168
So basically the CF DNS auto-population tool was able to determine that the loadbalancer hostname above resolves to two different IP addresses- and created two A name records accordingly. However- this is NOT CORRECT because due to the nature of AWS loadbalancers- their IP addresses can change at any time:
“Because the set of IP addresses associated with a LoadBalancer can change over time, you should never create an “A” record with any specific IP address. If you want to use a friendly DNS name for your load balancer instead of the name generated by the Elastic Load Balancing service, you should create a CNAME record for the LoadBalancer DNS name, or use Amazon Route 53 to create a hosted zone.”
In this situation I’m not sure what my options are because we NEED the toplevel record for mydomain.com to be an ALIAS record pointing to a loadbalancer.