Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

raise ValueError("Unsupported Lambda runtime {}".format(runtime))

Has anyone had this error recently?

File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\local\docker\lambda_container.py", line 65, in init raise ValueError("Unsupported Lambda runtime {}".format(runtime)) ValueError: Unsupported Lambda runtime nodejs12.x

If so, how did you solve it?

So far I have tried uninstalling aws-sam-cli and reinstalling. Then I tried the same with Docker.

I have checked that the runtime for is set to nodejs12.x for each lambda function.

It gets thrown when I try to debug any lambda function locally in vscode. Up until about 2 weeks ago I was able to debug. All I find when I Google the problem are various references to the fact that "On 18th November 2019, AWS published they are now supporting Node.js 12.x runtime in AWS Lambda".

Thanks in advance to anyone who might be able to help me.

like image 686
MountainBiker Avatar asked Jul 25 '26 11:07

MountainBiker


1 Answers

AWS Sam released a new version v1.21.0 just 30 minutes after you asked the question.

I recommend you upgrade again now that version and try again.

Here are the release notes for that version: https://github.com/awslabs/serverless-application-model/releases/tag/v1.21.0

One of the reasons it is not working is you may be using lambda edge, which doesn't support runtime node 12.x yet.

Reference: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html

like image 163
me2resh Avatar answered Jul 27 '26 23:07

me2resh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!