Setting up a CDK pipeline to deploy on multiple accounts and regions
Once your pipeline reaches a certain complexity, it’s good practice to deploy it to different environments using different accounts or at least different regions; this separates the environments (especially when using different accounts), which reduces the blast radius if something goes wrong and helps with security separation. For instance, you can allow developers to log in to pre-production accounts for troubleshooting or investigation, but only administrators can access production accounts. Another reason to do this is to avoid having different environments competing for service quotas, which in most cases are per account and region.
Deploying on multiple regions is often used to serve customers in that area or if your service needs to survive a regional disaster.
Getting ready
This recipe is an extension of the Setting up a code deployment pipeline using CDK and AWS CodePipeline recipe; therefore...