- Newest
- Most votes
- Most comments
This is a common issue where the CDK bootstrap process appears successful, but the deployment still fails with a bootstrap detection error. There are several potential causes and solutions:
-
Region Mismatch: Ensure the region in your deployment command matches the bootstrapped region. Set the AWS_DEFAULT_REGION environment variable to us-east-2 to make sure your commands are targeting the correct region.
-
New Bootstrap Format: Try setting the environment variable CDK_NEW_BOOTSTRAP=1 and then run the bootstrap command again. Amplify and newer CDK versions use a different bootstrap format than older versions.
-
Try Alternative Bootstrap Command: Use the AWS CDK CLI directly with:
npx aws-cdk@latest bootstrap aws://956394424627/us-east-2
-
Verify Bootstrap Stack: Check if the CloudFormation stack named "CDKToolkit" exists in your us-east-2 region. This confirms whether bootstrapping was successful.
-
Permissions Issue: Verify that your IAM user or role has the necessary permissions to access the bootstrap resources. The error message indicates credential issues with assuming the deploy role.
-
Clear Local Cache: If you're using Amplify, try clearing your local Amplify cache by removing the .amplify directory in your project folder.
If the issue persists after trying these steps, you might need to check CloudTrail logs for any denied API calls related to accessing the bootstrap resources or assuming the deploy role.
Sources
ran cdk bootstrap aws://956394424627/us-east-2 successfully but deploy says BootstrapNotDetectedError: This AWS account and region has not been bootstrapped. | AWS re:Post
CDK Bootstraping | AWS re:Post
Deployment - Verifiable Controls Evidence Store
My Amplify environment started to fail in a sudden. Bootstrap Error | AWS re:Post
answered a year ago
Relevant content
- AWS OFFICIALUpdated 2 years ago
