I have two web applications, one in Amazon's US-West-1 region and one in the US-East-1 region running on EC2. For the most part, they do the same thing, but they service different customers based on the customer's location. Each application references a separate ElastiCache cluster in the respective region.
I currently have a CNAME record in Route53 pointing a subdomain (i.e. cache.domain.com) to the US-West-1 ElastiCache cluster's endpoint so the web application running on an EC2 instance in US-West-1 can easily reference it. Now, I'd like the other web application running in US-East-1 to resolve the same domain name (cache.domain.com) to the endpoint of ElastiCache cluster in its region, US-East-1.
So far, I've tried using a Geolocation routing policy with two CNAME records for cache.domain.com, one using "Default" as the location, which redirects to the US-West-1 endpoint and the other using United States as the location and Virginia as the sublocation which redirects to the US-East-1 endpoint. For some reason, cache.domain.com is still resolving to the US-West-1 endpoint on the EC2 instance in US-East-1.
Since ElastiCache only assigns URLs with FQDNs as cluster endpoints, I can't just use the hosts file to override DNS resolution on my US-East-1 server, which would make things easier. Is there any other way to do this?