Open seawolf-qrs opened 5 months ago
We are running into this same issue. We bootstrap accounts in our organization using stacksets with specific guardrails so the CDK resources are already present, but amplify is trying to bootstrap the account with the CDKToolkit
stack anyway.
Update 1: I've updated our bootstrap template to the latest version (v. 20) and we'll see if that helps.
Update 2: That didn't help, it's still trying to bootstrap the account with the CDKToolkit
stack.
Hey @seawolf-qrs :wave: thanks for raising this! Agreed, we should add a section in the troubleshooting docs and improve this error message 🙂
Amplify Docs - Bootstrap your AWS account
The documentation doesn't provide information on the error that will present in the console if the AWS account already has a CDKToolkit:
Stack [CDKToolkit] already exists
If the account was bootstrapped previously, the option to initiate the first-time setup does not appear when going through the steps to create an Amplify application. The option does not appear before clicking through to create the new app, which then leads to the
Stack [CDKToolkit] already exists
error.I found that this GitHub issue provides a solution to move past this error. You can open Cloudshell and run
cdk bootstrap aws://ACCOUNT-NUMBER-1/REGION-1
to update the bootstrap stack to a new version. Once this is done, the error no longer appears, and the app creates successfully.I think it would benefit users of the Amplify service to have a section in the documentation that mentions this error and how to move past it.