Skip to content

My Amplify environment started to fail in a sudden. Bootstrap Error

0

I am developing new app, and i was deploying my new version.. it failed with the error

Command to deploy backends in a custom CI/CD pipeline. This command is not intended to be used locally.
Options:
--debug Print debug logs to the console [boolean] [default: false]
--help Show help [boolean]
--branch Name of the git branch being deployed [string] [required]
--app-id The app id of the target Amplify app [string] [required]
--outputs-out-dir A path to directory where amplify_outputs is written. If not provided defaults to current process working directory.
[string]
--outputs-version Version of the configuration. Version 0 represents classic
amplify-cli config file amplify-configuration and 1 represents newer config file amplify_outputs
[string] [choices: "0", "1", "1.1", "1.2"] [default: "1.2"]
--outputs-format amplify_outputs file format
[string] [choices: "mjs", "json", "json-mobile", "ts", "dart"]
2025-01-23T22:29:30.033Z [INFO]: BootstrapNotDetectedError: This AWS account and region has not been bootstrapped.
Resolution: Run `cdk bootstrap aws://{YOUR_ACCOUNT_ID}/{YOUR_REGION}` locally to resolve this.
Cause: Is account 619071308502 bootstrapped
2025-01-23T22:29:30.132Z [ERROR]: !!! Build failed
2025-01-23T22:29:30.132Z [ERROR]: !!! Error: Command failed with exit code 1

I tried to run the bootstrap command suggested, it looked like it worked in the cloudshell, but deployment failed again... Just out of cruosity, i reployed my old branche which was already deployed... failed...

I created new app, and tried to deploy there: failed again

I dont know whats going on, can you please help

asked 2 years ago637 views

2 Answers
1

It appears you're experiencing a bootstrap issue with your AWS Amplify environment. This error typically occurs when the AWS account and region you're using haven't been properly bootstrapped for AWS CDK (Cloud Development Kit) deployments, which Amplify uses under the hood.

To resolve this issue, try the following steps:

  1. Ensure you're using the latest version of the AWS CLI and Amplify CLI. Outdated versions can sometimes cause unexpected errors.

  2. Run the bootstrap command again, but this time make sure you're using the correct AWS profile and region. The command should look like this:

    cdk bootstrap aws://ACCOUNT-NUMBER/REGION

    Replace ACCOUNT-NUMBER with your AWS account number and REGION with the region you're deploying to.

  3. After running the bootstrap command, wait a few minutes before attempting to deploy again. Sometimes it takes a short while for the changes to propagate.

  4. If you're still encountering issues, try clearing your local Amplify cache. You can do this by removing the .amplify directory in your project folder.

  5. Check your IAM permissions. Ensure that the IAM user or role you're using has the necessary permissions to perform CDK bootstrap operations and Amplify deployments.

  6. If none of the above steps work, you might want to try creating a new Amplify app from scratch. Sometimes, configuration issues can persist in existing apps.

  7. As a last resort, you may need to contact AWS support if the issue persists across multiple apps and environments.

Remember, sudden failures like this can sometimes be caused by changes in the AWS environment or updates to the Amplify CLI. Always ensure you're using the latest stable versions of all tools and SDKs.
Sources
Amplify sandbox bootstrap failing inside a VS Code dev container | AWS re:Post
AWS Amplify Deployment Failed | AWS re:Post
Amplify -> Content giving error "Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found." | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

0

Hi, I'm currently facing the same problem where suddenly amplify deploy is returning an error with bootstrapping, even though there was no problem with it before. Have you found a solution for this? Thanks

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.