- Newest
- Most votes
- Most comments
The error message "SSM parameter /cdk-bootstrap/hnb659fds/version not found. Has the environment been bootstrapped?" indicates that your AWS environment has not been bootstrapped for CDK deployments.
To fix this issue, you need to run the cdk bootstrap command before attempting to deploy your CDK stack. This command creates the necessary resources in your AWS account that CDK needs for deployment, including:
- An S3 bucket to store assets
- IAM roles for deployment
- SSM parameters to track bootstrap versions
Here's how to fix the issue:
- Run the following command in your terminal:
cdk bootstrap
-
This will create a CloudFormation stack named "CDKToolkit" in your account with all the required resources.
-
After the bootstrap process completes successfully, try running your deployment command again:
cdk deploy --require-approval never --all
If you need to customize the bootstrap process, you can use additional parameters with the bootstrap command, such as specifying a custom bucket name:
cdk bootstrap --bootstrap-bucket-name=my-custom-bucket-name
If you continue to face issues after bootstrapping, ensure you're deploying to the same region where you bootstrapped. You might need to set the AWS_DEFAULT_REGION environment variable or specify the region in your CDK app configuration.
Sources
CDK Bootstraping | AWS re:Post
Register multiple AWS accounts with a single email address by using Amazon SES - AWS Prescriptive Guidance
Solution for Monitoring Amazon EKS infrastructure with Amazon Managed Grafana - Amazon Managed Grafana
CDK Bootstrapping Issue | AWS re:Post
answered a year ago
It's an additional question. I tried above command. but I got below error command. how to fix it? ✨ Synthesis time: 100.22s
NOTICES (What's this? https://github.com/aws/aws-cdk/wiki/CLI-Notices)
34892 CDK CLI will collect telemetry data on command usage starting at version 2.1100.0 (unless opted out)
Overview: We do not collect customer content and we anonymize the
telemetry we do collect. See the attached issue for more
information on what data is collected, why, and how to
opt-out. Telemetry will NOT be collected for any CDK CLI
version prior to version 2.1100.0 - regardless of
opt-in/out.
Affected versions: cli: ^2.0.0
More information at: https://github.com/aws/aws-cdk/issues/34892
If you don’t want to see a notice anymore, use "cdk acknowledge <id>". For example, "cdk acknowledge 34892". RagKnowledgeBaseStack: SSM parameter /cdk-bootstrap/hnb659fds/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
answered a year ago
