- Newest
- Most votes
- Most comments
Confirm whether CDK bootstrap worked correctly in the region you are using Amplify. To do so, you can login to account, go to CloudFormation console in the correct region and look for a stack CDKToolkit. If it's there CDK has been bootstrapped.
This issue occurs when your AWS account and region have been bootstrapped, but the CDK or Amplify deployment process is still unable to detect the bootstrap resources. There are a few potential causes and solutions:
-
Region Mismatch: You bootstrapped us-east-2, but your application might be trying to deploy to a different region. Make sure the region in your deployment command matches the bootstrapped region.
-
Environment Variables: Set the AWS_REGION or AWS_DEFAULT_REGION environment variable to ensure your deployment targets the correct region:
set AWS_DEFAULT_REGION=us-east-2
-
Hard-coded Region in Code: Your application code might have a hard-coded region that differs from the one you bootstrapped. Check your app configuration files.
-
CDK New Style Bootstrapping: Ensure you're using the new style of CDK bootstrapping by setting the environment variable:
set CDK_NEW_BOOTSTRAP=1
Then run the bootstrap command again.
- Amplify Specific Issue: If you're using Amplify, try running:
npx aws-cdk@latest bootstrap aws://956394424627/us-east-2
-
Permissions: Verify that the IAM user or role you're using has the necessary permissions to access the bootstrap resources.
-
Synth Lock Issue: If there's a stale synth lock, look for a file called "cdk.out/synth.lock" and remove it if no other synth process is running.
After making these changes, try your deployment again. If the issue persists, you might need to check CloudTrail logs for any denied API calls related to accessing the bootstrap resources.
Sources
Encountering an issue while setting up my Amplify Data backend | AWS re:Post
Register multiple AWS accounts with a single email address by using Amazon SES - AWS Prescriptive Guidance
Deployment - Verifiable Controls Evidence Store
CDK Bootstrapping Issue | AWS re:Post
Relevant content
asked a year ago
asked 9 months ago
asked a year ago
