3

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?

2

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.

| improve this answer | |
0

No. The ELB IPs may always change without notice. The only way to get a stable IP is an EIP and do the proxy yourself, or their new NLBs.

If you mean can you set a DNS entry going straight to the IPs yourself, no (well you can, but don't). Amazon maintains the DNS entry they put atop it, but if you try to set your own with its own TTL you can absolutely have a broken IP for however long your TTL is. CNAME to their provided DNS name as necessary.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.