Search code examples
amazon-web-servicesamazon-cloudfrontamazon-elbamazon-route53

Route 53 Configuration - Which is better ALIAS A or ALIAS CNAME RRS


Question:

When configuring Route 53 with AWS services such as CloudFront or ELB, which is better to use: an ALIAS A record or an ALIAS CNAME record?

Background:

An interesting thread developed on this question regarding the benefits of ALIAS records.

Thread Link

My intention is to create this question so that informed answers and knowledge can be collected in one place.


Solution

  • There is no "better," there's only one correct answer: the Alias RR type must be the same as the target RR. For CloudFront, S3, ELB, etc., an Alias of type CNAME is not sensible, since the target is not a CNAME, it's an A.

    But if the question is a choice between A alias=yes and CNAME alias=no, then A alias=yes is still the better solution.

    The assertion at the other question is that Alias records are equivalent to CNAMEs but intended for the zone apex only is incorrect on both counts.

    Alias A records cause ultimate behavior similar to CNAME behavior but they are preferred because they cut the DNS resolution time approximately in half by requiring only one resolver action, instead of two, and because they reduce your per-query cost to 0 when the alias target is an AWS service.