14

I am converting a route53 CNAME recordset with 60 seconds ttl to an A recordset pointing to a cloudfront resource.

The AWS documentation states: "If an alias record points to an AWS resource, you can't set the time to live (TTL); Route 53 uses the default TTL for the resource."

What is the default TTL for a Route53 Alias record pointing to a Cloudfront resource?

ThatChrisGuy
  • 559
  • 2
  • 7
  • 23

2 Answers2

19

The TTL on *.cloudfront.net hostname A records (and, by extension, their aliases) is 60 seconds.

I don't recall this being documented, but it is consistently observable using dig.

Michael - sqlbot
  • 169,571
  • 25
  • 353
  • 427
  • 7
    Defined here: https://aws.amazon.com/route53/faqs/ "Alias records which have fixed TTL of 60 seconds" – John Hanley Sep 24 '18 at 22:04
  • Thanks! Glad to see its somewhere in their documentation! nice catch! hehe – ThatChrisGuy Sep 25 '18 at 02:39
  • 1
    The complete quote from the Route 53 FAQ is *"In order to configure DNS Failover for ELB and S3 Website endpoints, you need to use Alias records which have fixed TTL of 60 seconds; for these endpoint types, you do not need to adjust TTLs in order to use DNS Failover."* This does not appear to be a statement about Alias records, because Alias records in general do not have a fixed TTL -- they follow the TTL of the target record. Instead, it is probably correct to interpret this as a statement about ELB and S3 alias targets. CloudFront happens to use the same value. – Michael - sqlbot Jan 09 '20 at 15:24
  • _"This does not appear to be a statement about Alias records"_ @Michael-sqlbot: it says "Alias" right there in the sentence you quoted. Alias record is 60 seconds TTL, which the user cannot change. – Felipe Alvarez Feb 28 '20 at 04:04
  • 2
    @FelipeAlvarez Alias records **do not** in fact have a fixed TTL of 60 seconds. Alias records mirror the TTL of the alias target. The documentation *appears* to be making a statement about alias records but it cannot be the case, because that statement is not accurate. Amazon seems to use 60s TTLs in all the relevant parent record zones, but that has nothing discernable to do with any essential/fundamental attribute of Alias records, which is my point. As far as I am concerned, this remains undocumented. – Michael - sqlbot Mar 01 '20 at 18:47
  • 5
    FAQs https://aws.amazon.com/route53/faqs/ now state - "Amazon Route 53 does not have a default TTL for any record type." and https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html states "If an alias record points to an AWS resource, you can't set the time to live (TTL); Route 53 uses the default TTL for the resource. " – kiran01bm Dec 31 '20 at 00:12
3

I was searching for a similar question, "What is the default TTL for Route 53 records that are aliases of a Load Balancer and why I cannot set it myself?"

I found here a pretty good answer:

You can't set the TTL on an alias record because there's no actual record there, it's just a pointer to a real record. Your choices:

  1. set the TTL on the target record (if you control it), or
  2. accept the TTL on AWS-managed services like CloudFront and ELB (60 seconds), or
  3. Just use ordinary CNAME records.

I didn't find any official documentation though.

Alex MM
  • 306
  • 3
  • 11