1

First of all, I am new to AWS. :) And I am trying to do the following:

enter image description here

  • There are 2 environments (blue and green) each having an EC2 instance hosting a Website and APIs, and a Cloud Front distribution
  • Cloud Front is the entry point to my website, it handles all static resource requests and forwards PUT/POST/DELETE to Origin Server (EC2 instance)
  • Release process starts by pulling recent changes to the non-production environment (green one in this case), and invalidating the Cloud Front GREEN cache
  • After the cache invalidation is complete, I need to point www.site.com to green environment (green.site.com). This can be done by managing DNS, but I guess there is something in Amazon that I can put in "WHAT GOES HERE?" place in the image so I can make it switch quickly to another CloudFront distribution, without having to wait for DNS changes to propagate...

So, what can I use from AWS to route requests to different Cloud Fronts?

Googling didn't help...

3

At this time, there is not a viable hot swap solution for CloudFront.

There are two things you must do to switch your blue-green deployments:

  1. You must remove www.site.com from the active deployment's list of aliases so it stops responding to those requests. Then you must wait for that CloudFront change to propogate across the network. Only then can you add www.site.com to the inactive deployment. And again, you must wait. Only AWS Support can make this swap immediate.

  2. Once above is complete, then you must use DNS (Route 53) to point the DNS to the inactive deployment.

Unfortunately, there isn't anything for your "What goes here" spot.

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.