I have two CloudFront distributions A and B.
Assigned CNAMEs to distribution A (blue.domain.com and domain.com) and created appropriate SSL certificates. In Route53 I can assign an alias for distribution (e.g. domain.com -> blue.domain.com)
Regarding to aws docs I can't assign the same CNAME to distribution B (green.domain.com and domain.com) because CNAME domain.com has already been assigned to distribution A.
I was intended to switch traffic between blue/green distributions using Route53. E.g. domain.com points blue.domain.com and then make domain.com points to green.domain.com
So this approach doesn't work. I've found another one:
- Update Route53 to anticipated CloudFront distribution
- Remove CNAME from Blue
- Add CNAME to Green
But it leads to both distributions A & B downtime and requires several manual steps.
Is there any different way to achieve blue/green switching?