If you are using Amazon ElastiCache in your application, you can use Auto Discovery to automatically detect ElastiCache nodes and connect to them. Auto Discovery uses a Domain Name System (DNS) query to find the endpoint for an ElastiCache node. When you enable Auto Discovery, your application must reference the ElastiCache node endpoint using the following format:
For example, if your Auto Discovery domain is myapp.cache.amazonaws.com, your application would connect to the myapp.cache.amazonaws.com DNS endpoint, and then use Auto Discovery to find the ElastiCache node endpoint.
You can enable Auto Discovery when you create a new ElastiCache cluster or node group, or you can enable it for an existing ElastiCache cluster or node group.
More information on Auto Discovery can be found here: