Reputation: 2444
I have latest node installed:
node --version
v14.15.0
I installed sam-cli from https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-windows.html
Then i ran following command npm install -g aws-sam-local
When i run:
sam --version
I get following:
A newer version of the AWS SAM CLI is available!
Your version: 0.2.11
Latest version: 1.9.0
See https://github.com/awslabs/aws-sam-local for upgrade instructions
I am attempting to invoke aws lambda function locally like following:
sam local invoke
I get following output:
2020/11/11 22:24:18 Successfully parsed template.yml
2020/11/11 22:24:18 Connected to Docker 1.40
2020/11/11 22:24:18 Could not initiate nodejs14.15 runtime: unsupported runtime
What am i missing?
Upvotes: 2
Views: 8702
Reputation: 808
I faced similar issue. My sam version was SAM CLI, version 1.2.0.
Upgraded to SAM CLI, version 1.35.0 and issue got resolved.
Upvotes: 0
Reputation: 2444
Problem was i somehow installed 2 versions of sam-cli. I just deleted both from C:\Program Files\Amazon and reinstalled using msi from https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-windows.html.
After this i was getting command not found when running
sam --version
Finally found that
sam.cmd --version
worked as expected.
Upvotes: 4
Reputation: 6998
It seems like that your CLI version does not not support node v14.15.0.
I would suggest upgrading your CLI or downgrading your node version, depends on what you want to do.
Upvotes: 0