In linux , /etc/hosts
stores ip aliases.
But I want to create a hostname without knowing its IP address.
In Amazon RDS , it's endpoint is a long domain name such as : my-db.ooxxooxxooxxoo.ap-northeast-1.rds.amazonaws.com
. It doesn't suggest connecting by IP (because it may change).
In such situation , how do I resolve a simple db
string to this domain name ? WITHOUT any outer help , such as DNS CNAME or Route53 solution.