I started an Amazon RDS instance (with Multi-Az enabled) and was provided with a host name like instance.abc123.us-west-1.rds.amazonaws.com. Will this instance's hostname ever change? Can I use this hostname directly in my applications, or should I be using other DNS aliases (or AWS elastic IP addresses) or something?
Asked
Active
Viewed 1.5k times
2 Answers
3
Amazon RDS instance hostnames don't change for as long as the instance is running. It persists reboots too. If you use a cluster, then you should use the cluster endpoint as the hostname in your applications. You could use the hostname as it is or create a simple CNAME record in your DNS to make it memorable.
eternaltyro
- 262
1
You should look into using Route53.. That's their DNS services. I recommend setting up Route53, adding a CNAME to your RDS instance so that you can have your code refer to it by hostname found in Route53 as opposed to the generic AWS Hostname. The generic hostname does not change for RDS but it would certainly be helpful to use Route53 to give it a better hostname.
ryekayo
- 472
-
1Is Route53 just a DNS service? Is there a reason to use Route53 over our existing service? – simpleuser Sep 11 '17 at 19:17
-
You can use either or.. im only mentioning Route53 because i assumed it was in use – ryekayo Sep 11 '17 at 19:18
If you delete this instance and create a new one with the same db identifier, it even reclaims the old hostname.
Woah, I didn't know this.
– eternaltyro Sep 12 '17 at 03:08