I've cloned an existing CDK Project, to use it for further development. I was able to install all the python dependencies as well as cdk/npm dependencies using:
python -m pip install lambda/requirements.txt
npm install
After the installation, I've tried performing the cdk ls command but I'm getting below mentioned error:
D:\Users\xyz\.aws\Work\Project\iac>npm run cdk synth
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> [email protected] cdk
> cdk "synth"
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\protocol\json.js:52
resp.error = util.error(new Error(), error);
^
ParameterNotFound:
at Request.extractError (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\protocol\json.js:52:27)
at Request.callListeners (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\sequential_executor.js:106:20)
at Request.emit (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
at Request.emit (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\request.js:686:14)
at Request.transition (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\state_machine.js:14:12)
at D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\request.js:38:9)
at Request.<anonymous> (D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\request.js:688:12)
at Request.callListeners D:\Users\xyz\.aws\Work\Project\iac\node_modules\aws-sdk\lib\sequential_executor.js:116:18)
Subprocess exited with error 1
I've deleted the node_modules folder and tried re-installing the libraries, but I still get the same error. The project uses codepipeline as well, could it be an issue because of that. I've just started working with AWS CDK therefore I'm not sure about this issue. If anyone has seen this error before, please point me into the right direction. Any help is appreciated.
CodePudding user response:
It seems that your project references some SSM parameter. I found this error: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ssm/modules/parameternotfound.html
Make sure you are authorized to right AWS account/region. Look for parameters reference in code.