0

I am in a bit of a specific situation with what I am trying to achieve

Right now I host on cn-north-1 with a CloudFront distribution.

I have a Route53 CNAME setup pointing to this distribution on Global AWS

The problem I am facing is that the cn-north-1 CloudFront distribution only has edge locations inside China and not elsewhere around the globe.

Is it possible for me to set up a CloudFront distribution on the global AWS site and use two CDN's simultaneously based on user location?

so the workflow would basically be

User arrives from inside China they will go to cn-north-1 Cloudfront distribution

User arrives from outside of China they will go to the AWS Global Cloudfront distribution

0

Update - this apparently won't work, but I'll leave the answer here so people can see it's been tried. Please resist the urge to downvote or I'll delete the answer.

--

I don't know if this will work and I can't test it as I don't use the China region, but it's worth a shot.

  1. Open the AWS console to a non-China region
  2. Create a Route53 hosted zone with a Geolocation routing policy.
  3. Create an A record (docs) (not CNAME).
  4. Create a Geolocation record for China, pointing at the China CloudFront distro in China.
  5. Create a Geolocation record for everywhere else, pointing at your other non-China distribution.

I suspect things will fail adding the Chinese CloudFront distro, but it's worth a shot.

If this doesn't work I'll delete the answer, and hope someone else can help.

  • 1
    Ah yea that is actually exactly what I already tried thinking it would work ha, I have contacted AWS support in China to see if they can shed some light. Once I get a message back from there if all goes well I can post an answer. – NooBskie Oct 6 '20 at 8:27
  • Your method, unfortunately, doesn't work because for geolocation you need to use Alias records and you will get conflicts because Route53 will look for resources in your current account to alias to that don't exist – NooBskie Oct 6 '20 at 8:32
  • 1
    It was worth a shot. I'll leave the answer here so others know it's been tried. – Tim Oct 6 '20 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.