Route53 weighted routing to multiple cloudfront resources in same hosted zone doesnt work.

0

I have 2 cloudfront dists with alternate domain names as a.example.com and b.example.com and theyre setup in route53 so when i access either one, it gets to the correct cf dist.

Now I want to create a new subdomain c.example.com in route53 which will use weighted routing (125-125) so the traffic is evenly split and I want to route traffic to a.example.com and b.example.com.

I've setup routing, but im getting the following error when i access c.example.com

Secure Connection Failed

An error occurred during a connection to c.example.com. Cannot communicate securely with peer: no common encryption algorithm(s).

Error code: SSL_ERROR_NO_CYPHER_OVERLAP

    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.

Learn more…

My cert is managed by ACM, and it has both *.example.com and example.com domains listed.

My goal is to be able to create a new subdomain which can route traffic to existing cf dists. Any ideas if this is possible?

3 Answers
0

This is not likely possible using three separate CF distributions because you need to add your hostname(s) as an alias on its respective distribution. So you have a distro for a.example.com (lets call it distro A), and that has an alias for a.example.com. Your distro for b.example.com (distro B) will have an alias for b.example.com. But you don't want a third CF distribution for c.example.com (distro C), you want c.example.com to split 50/50 to distro A/B. The challenge is you can only have your c.example.com alias on one distro at a time, you cannot have it on both distro A and distro B.

An alternative might be to use a single record in Route 53 and a single CF distro, and then handle your A/B switching as part of the distro.

profile pictureAWS
answered 2 years ago
  • The challenge is you can only have your c.example.com alias on one distro at a time, you can have it on both distro A and distro B.

    I didnt catch this part.

    you can have it on both distro A and distro B.

0

Apoligies, that was a typo. I meant to say you cannot have an alias on both distributions. I fixed my original answer above.

For more information on using these aliases, see the restrictions section in the documentation here.

profile pictureAWS
answered 2 years ago
0

You can achieve a similar behavior using a single distribution and Lambda@Edge functions. Check this sample for an implementation of the feature: https://github.com/aws-samples/ab-testing-at-edge

AWS
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions