I have a Kubernetes cluster in AWS, with apps that talk to AWS services like RDS, Elasticache, Elasticsearch, DynamoDB, etc.
For the services where it's available (Elasticache and RDS, and more recently Elasticsearch with a custom ACM certificate), I've considered making a private zone in Route53 and making CNAMEs for all the things. So instead of
app-production.789yuiahsdf.redis.elastitcache.aws.com or whatever the Elasticache endpoint is, my app talks to
sidekiq.redis.app. I'd use a pattern, maybe
<purpose>.<service>.<app>, so I'd have
replica.postgres.app, etc, etc.
The next step is having the app is configured by default to use these hosts. In development, staging, and production, they don't NEED any configuration (maybe it's still available), but the defaults should "just work" if the environment is set up properly.
What are the downsides here? What am I missing? To me, this seems sort of like simple service discovery and a reasonable idea. But reasonable ideas can sometimes bite you later on.