First of all, I am new to AWS. :) And I am trying to do the following:
- 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...