A CDK application deploys in the home Region and fails in a new Region on the first attempt. The error says the environment is not bootstrapped. The template itself was not changed. What should run in the new Region before the deploy is retried?
Select an answer to reveal the explanation.
Short Explanation
CDK needs a small toolbox in each account and Region before the first deploy, and this Region does not have it yet. You bootstrap that environment. Peering the Region to the internet is not the toolbox, and deleting the working stack does not create it.
Full Explanation
A CDK deploy looks for a bootstrap environment in the account and Region where it is deploying, including the roles and the asset bucket it uses to publish files. The error says this new Region is not bootstrapped, and the template itself did not change, so the same application can succeed at home and fail on the first attempt here. Running cdk bootstrap for that account and the new Region creates the missing environment before the deploy is retried. A VPC peering connection from the new Region to the public internet does not create those roles or that bucket. Deleting the home Region stack removes a working environment and does not bootstrap the new Region, and the names in the home stack are not what the error is complaining about. A public AMI does not satisfy the bootstrap check. Caveat: bootstrap is per account and Region, so the home Region's toolkit stays invisible in the new Region, and an old toolkit can fail a later deploy after a CDK upgrade. Operational check: confirm the bootstrap stack exists in the new Region, then retry the same deploy and confirm it gets past the bootstrap error.