HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Are Route 53 DNS records aliasing ELBs guaranteed for their lifetime?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
routelifetimeareelbsrecordsdnsforaliasingguaranteedtheir

Problem

Given a Route 53 DNS record aliasing a (classic) load balancer, and the potential for the load balancer ip to change:

Is it possible for the DNS record to guarantee that the provided ips are valid for the record's lifetime? If so, is there a specific TTL value I need to set?

Solution

If you’re talking about using a Route 53 ALIAS record, you cannot set the TTL on it, for this reason. It defaults to a low value, and is managed by AWS for you (to the world it appears as an A record, and it will change often).

If you’re using a CNAME, then you can set whatever TTL you like. The TTL of the DNS record for the load balancer’s domain will be low, but you don’t need to worry about that. Your only concern in this circumstance is whether you think you’ll be changing the load balancer name or repointing the name elsewhere. If you don’t plan to do that, you can set a high TTL to save a bit of money and milliseconds at load time.

Either way, the IP addresses themselves will change.

For help choosing between an ALIAS and CNAME record, see https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html. I’d usually recommend a CNAME unless you’re pointing your root domain, in which case you have to use an ALIAS.

Context

StackExchange DevOps Q#4636, answer score: 2

Revisions (0)

No revisions yet.