Is it possible to set up RDS in such a way that EC2 instances use the RDS Instance Identifier "mydb" to connect to RDS instead of using the public DNS name : mydb.cfnr64hlvtcp.us-east-1.rds.amazonaws.com
. ?
The only way to access an RDS database is by using the public DNS endpoint name generated by RDS when the database is created.
You could setup your own CNAME for the RDS DNS name if you wanted to hide the public DNS name from a component in your system, but then you must maintain that entry, which seems a bit complicated.
AWS strongly recommends that you don't use the IP address behind the RDS DNS entry directly since that IP may change, for example if your database has to failover to a new instance. [1]
[1] http://aws.amazon.com/rds/faqs/#What_is_a_DB_Subnet_Group_and_why_do_I_need_one
AWS has documentation for creating RDS CNAME's:
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-rds-db.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With