Statista CDK Construct Library
This package contains CDK constructs for general purpose at Statista. The repository name might suggest, that it's bound to Remix, but it's not.
Strategy to do major migrations with CDK
There are times we need to do a migration of our CDK stacks at Statista. Usually this is the case when major infrastructure changes are done. For example moving an application from Lambda to Fargate.
There are a few known resources which cannot do an uninterrupted change during this kind of major updates.
From AWS side these are the (currently) known components:
- LoadBalancer TargetGroup
- Route53 Domain Records
From Statista Infrastructure the CDN is not always able to support uninterrupted changes.
The way to handle this changes without a scheduled downtime follows the below described process:
[!IMPORTANT] Handle with care and test it in your specific case step by step!
-
Keep your existing infrastructure unchanged (e.g. a remix app)
Add new infrastructure to your existing stack but add new domain names, LoadBalancer TargetGroupIds.
Do not add the new infrastructure to the CDN yet.Deploy everything on stage and check that the old setup is still working correctly.
Check that the new infrastructure is also available and working as expected.
-
Keep your existing infrastructure unchanged (e.g. a remix app)
Add the URL of the new infrastructure to the CDN Deployment without any other change to infrastructure.
Deploy everything on stage and check that the new setup is working correctly through the CDN.
-
Remove the old infrastructure from your stack.
Make sure to not cleanup things in the new infrastructure (e.g. domain names).
Deploy everything on stage and check that the new setup is working correctly through the CDN.
-
In case of the need to cleanup anything in the new infrastructure, restart the process from 1. (A cleanup is just another major change)