Skip to content
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

Bootstrapping local sandbox to Amplify Console fails the CDKBuild stack, preventing new development. Says "The given region has not been bootstrapped." #2082

Closed
bebopinbebop opened this issue Oct 6, 2024 · 3 comments
Labels
console Issues related to Amplify console UI/UX pending-triage Incoming issues that need categorization

Comments

@bebopinbebop
Copy link

Environment information

System:
  OS: macOS 14.7
  CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 20.99 GB / 64.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
  Yarn: undefined - undefined
  npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.3.1
  @aws-amplify/backend: 1.3.1
  @aws-amplify/backend-auth: 1.2.0
  @aws-amplify/backend-cli: 1.2.9
  @aws-amplify/backend-data: 1.1.4
  @aws-amplify/backend-deployer: 1.1.4
  @aws-amplify/backend-function: 1.5.0
  @aws-amplify/backend-output-schemas: 1.2.1
  @aws-amplify/backend-output-storage: 1.1.2
  @aws-amplify/backend-secret: 1.1.3
  @aws-amplify/backend-storage: 1.2.1
  @aws-amplify/cli-core: 1.1.3
  @aws-amplify/client-config: 1.4.0
  @aws-amplify/deployed-backend-client: 1.4.1
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.8
  @aws-amplify/platform-core: 1.1.0
  @aws-amplify/plugin-types: 1.3.0
  @aws-amplify/sandbox: 1.2.2
  @aws-amplify/schema-generator: 1.2.4
  aws-amplify: 6.6.3
  aws-cdk: 2.160.0
  aws-cdk-lib: 2.160.0
  typescript: 5.6.2
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Describe the bug

I am following the Amplify Documentation for React Native here:
https://docs.amplify.aws/react-native/start/quickstart/

and I am on the step where I build a sandbox with:

npx ampx sandbox

and my terminal opens a webpage for me to login to my AWS console

image

When I click to run it, it begins, then crashes on 2% here:
image

I have tried everything that I could think of, but I do not know why its happening.

  1. I've created a user in IAM with admin privileges that I used to sign in to the aws cli using its Access Key and Secret Key.

  2. I've made a local sso in the cli called "amplify-admin" from here: https://docs.amplify.aws/react-native/start/account-setup/ and ran

npx ampx sandbox --profile amplify-admin

but it still fails and delivers a ROLLBACK_IN_PROGRESS

  1. I even pushed my code to github and tried deploying it on the Amplify GUI online so that I can then pull the resources filed down into my project but that didn't do anything.

I tried following the suggestions here:
#1510

  • I've tried removing the .credentials file
  • changed the profile from sandbox to default, an access key profile and a SSO profile
  • I installed the CDK CLI
  • I've deleted all my old projects on Amplify in case there was some reproduction clashes

I mean, I do not think it has anything to do with the region, I think it has to do with the Gen2 upgrade with AWS and some legacy expectations not being fulfilled here.

I just want to start developing with QuickStart guide so I can move my project over, and this is preventing me from doing so. Any help would be appreciated.

Reproduction steps

run

npx ampx sandbox

and you will be asked to sign in to your profile to bootstrap the account. Mine does not work.

@bebopinbebop bebopinbebop added the pending-triage Incoming issues that need categorization label Oct 6, 2024
@josefaidt
Copy link
Contributor

Hey @bebopinbebop 👋 thanks for raising this! While we work to improve the error messaging in the console, can you navigate to the CloudFormation console and poke through the "Events" tab for the CDKToolkit stack? This error can surface if the stack was previously deleted, where the corresponding IAM roles and S3 bucket created for assets are not also deleted.

@josefaidt josefaidt added the pending-response Issue is pending response from author label Oct 7, 2024
@bebopinbebop
Copy link
Author

Hey @josefaidt

Okay, so I've been deleting every instance of the CDKToolKit stack every time when I made a change, except for the recent one. Attached is the Events tab you mentioned:

Failed CDKToolkit Stack Create

and saw that I had deleted a service role that failed creating the necessary resources on CloudFormation. This meant that CloudFormation could not find the necessary role to permit these edits. So, I copied the missing role name from the logs and created a new one with that name, giving it

AWSCloudFormationFullAccess

as its permissions policies.

Now when I run

npx ampx sandbox

I get this on my login online:
image

and back on my project, I get my

amplify_outputs.json

Thanks a lot for pointing out my issue!

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Oct 8, 2024
@josefaidt josefaidt added the console Issues related to Amplify console UI/UX label Oct 8, 2024
@ykethan
Copy link
Member

ykethan commented Oct 10, 2024

Glad to hear you were able to mitigate the issue. Closing the thread, do let us know if you are still experiencing this.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues related to Amplify console UI/UX pending-triage Incoming issues that need categorization
Projects
None yet
Development

No branches or pull requests

3 participants