-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDK bootstrap detection assumes stack name of CDKToolkit
#1510
Comments
I'm having the same problem. Trying to create a sandbox environment using When i run Both the Amplify app as well as the IAM Identity Center user are in the same region (eu-central-1) and the local profile seems correct too:
|
Hi @thomasoehri, this could also be caused by a region mismatch. Is the |
in mine case, the version 14 |
Hi @edwardfoyle, thank you for the great tip, but i have neither of them set. |
to debug this next, can you run the following commands and let us know the results
I'm assuming you are still getting this error:
|
I then attached the
P.S.: It is now showing
Here is a screenshot showing all three commands and their results: Note that i use the same profile |
Interesting! This is the code that makes the same CFN call to determine if the account-region is bootstrapped. Would it be possible for you to put a breakpoint in that method and see what you get back? |
Here is what i get back when i set a breakpoint in the This call throws an error with code 'ValidationError' and message 'Stack with id CDKToolkit does not exist':
The |
I have found the issue (at least for me). I've had credentials for another AWS account stored in |
Thank you @thomasoehri so much for you help in debugging this.
That was my next guess that
Thank you, yes we will look into adding this there. Can you share the snippet of your Obfuscated credentials file on how it looked? I'm guessing if the same profile name is present there, |
@OperationalFallacy, can you check if your situation is similar to the one we just discussed above? |
I see it recognizes sso profile (both with a workaround for gen1 -
There is still the prompt. Looks like a bug because the latest cdk cli works just fine, even with some older bootstrap version I have. |
what do you get with this command |
aws cloudformation describe-stacks --query "Stacks[].Outputs[?OutputKey=='BootstrapVersion'].[OutputValue]" --output text --profile xxxx``` - it prints 14 |
Thanks @OperationalFallacy, this is helpful. The code currently assumes that the |
Yes exactly, both profiles were named
|
CDKToolkit
Just ran into this myself. I'm a little bummed because I wanted to participate in the AWS Amplify full stack challenge credentials
config
|
@robokozo You should be able to give the SSO profile a different name from the profile in
Then you'll be able to run the sandbox with that profile using |
@thomasoehri Thanks for the info. Any idea about this?
|
I just encounter this issue as well but I was able to get it to work once I've removed ~/aws/.credentials |
I also got the same issue with same message |
When running this command 'npx ampx sandbox --outputs-format dart --outputs-out-dir lib' Run this command to fix it: 'npx aws-cdk@latest bootstrap aws://540444658130/us-east-1' |
this last comment from @zeeshanakhter2009 worked for me as well structure of the cli command is as follows npx aws-cdk@latest bootstrap aws://{AWS account Number}/{region} e.g. npx aws-cdk@latest bootstrap aws://123456789012/us-east-1 |
This finally worked for me, with one caveat: the |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20.9.0
Amplify CLI Version
12.10.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No, this is a brand new project
Describe the bug
npm create amplify@latest
completesnpx ampx sandbox --profile xxx-sso-xxx-dev
fails withThe given region has not been bootstrapped. Sign in to console as a Root user or Admin to complete the bootstrap process, then restart the sandbox.
Expected behavior
It must use bootstrapped CDK already in the account.
Reproduction steps
CDK bootstrapped in account
npm create amplify@latest
npx ampx sandbox --profile xxx-sso-xxx-dev
Project Identifier
n/a
Log output
Additional information
Looking at the web-page the cli opens:
and checking the link to the docs, I find a long and manual process to setup SSO and bootstrap CDK. I would expect find some information how it should work within existing SSO, and bootstrapped CDK
Also, other problems related to getting started. Gen2 UI lists gen1 apps here (https://us-east-1.console.aws.amazon.com/amplify/apps - why it's even listing them???) and offers to delete it 😱
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: