Route53 for AWS Elastic Search Domain gives certificate error : <p>I have create a AWS elastic search domain in Virginia and got a Endpoint url. </p>

<p><a href="https://i.stack.imgur.com/Fzc67.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Fzc67.png" alt="enter image description here"></a></p>

<p>Now I wanted to configure the Route53 behavior around it, so that a caller can use the same url, even though there is some change in elastic search or in case of a disaster recovery. </p>

<p>So,</p>

<p>Virginia Route 53 -- 1 Points to -- Virgina Elastic Search Domain URL
Oregon Route 53 -- 2 Points to -- Oregon Elastic Search Domain URL
Main Route 53 -- 3 Points to -- Route 53 1 or 2</p>

<p>I have already create these and also created and uploaded SSL certificate with correct SAN entries. But when I execute,</p>

<pre><code>curl https://mainroute53/health
curl https://virginiaroute53/health
curl https://oregonroute53/health
</code></pre>

<p>I am getting this error,</p>

<pre><code>curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
</code></pre>

<p>But when I am calling the Elastic Search URL directly its working. So I understand this is a issue with the way I am using the certificate. Any help appreciated.</p>
