3

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?

2 Answers 2

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.

3
  • 1
    "as long as the instance is running" - will it change if I modify the instance type (from small to medium, for example)?
    – simpleuser
    Sep 11, 2017 at 19:15
  • 1
    @simpleuser it does not change. If you delete this instance and create a new one with the same db identifier, it even reclaims the old hostname. The random numbers/letters are an opaque identifier for your account that differs by region. It has no meaning but all of your ETA instances within a region will have that same string in their hostnames. See docs.aws.amazon.com/AmazonRDS/latest/UserGuide/…. Sep 11, 2017 at 23:52
  • > 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. Sep 12, 2017 at 3:08
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.

2
  • 1
    Is Route53 just a DNS service? Is there a reason to use Route53 over our existing service?
    – simpleuser
    Sep 11, 2017 at 19:17
  • You can use either or.. im only mentioning Route53 because i assumed it was in use
    – ryekayo
    Sep 11, 2017 at 19:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .