I have a project with CDK and CDK Deploy does not work. My project is a simple CDK app that has been started with cdk init app --language typescript and was working at first. I don't have anything but a lambda and an api gateway in this project.
After adding NodejsFunction from @aws-cdk/aws-lambda-nodejs I faced some errors but by installing docker locally and some changes all those were resolved and synth completes successfully now.
I run cdk bootstrap and then cdk synth and then cdk deploy with the last one here is the error I see: (the rest finishes successfully)
SSM parameter /cdk-bootstrap/pipeline/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
bootstrap and synth work fine, my aws configure has been done and no errors anywhere but the deploy doesn't work.
More details: Error:
MyStackNameStack failed: Error: MyStackNameStack: SSM parameter /cdk-bootstrap/pipeline/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
at CloudFormationDeployments.validateBootstrapStackVersion (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:297:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at CloudFormationDeployments.publishStackAssets (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:272:7)
at CloudFormationDeployments.deployStack (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:179:5)
at CdkToolkit.deploy (/usr/local/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:184:24)
at initCommandLine (/usr/local/lib/node_modules/aws-cdk/bin/cdk.ts:213:9)
MyStackNameStack: SSM parameter /cdk-bootstrap/pipeline/version not found. Has the environment been bootstrapped? Please run 'cdk bootstrap' (see https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Package.json and CLI versions:
CDK version: 1.116.0
"@aws-cdk/aws-apigateway": "^1.116.0",
"@aws-cdk/aws-lambda": "^1.116.0",
"@aws-cdk/aws-lambda-nodejs": "^1.116.0",
"@aws-cdk/core": "^1.116.0",