serverless-offline icon indicating copy to clipboard operation
serverless-offline copied to clipboard

Docker Node16 runtime

Open alexanderwink opened this issue 3 years ago • 7 comments

Feature Request

AWS recently announced it is dropping support for Node 12 runtime. Recommended action is to upgrade to Node 16. However https://github.com/lambci/docker-lambda seems stale and there is no Node 16 lambda image available and there is no activity in the repo. Do you have any plan on how to support Node 16 runtime?

More info from AWS https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy

alexanderwink avatar Aug 24 '22 07:08 alexanderwink

thank you @alexanderwink for filing the issue. you are right, the entire nodejs docker functionality is becoming close to be unusable.

we could try the official amazon docker image: https://hub.docker.com/r/amazon/aws-lambda-nodejs

dnalborczyk avatar Aug 24 '22 10:08 dnalborczyk

I mean security wise is scary that serverless-offline has been hardcoded to use that lambci repos their docker images haven't been updated in 2 years and their github is equally stale.

I definetly suggest switching the image to something more reputable / maintained.

@dnalborczyk if i wanted to contribute fixing this what are the requirements for the image to have / include? What tools on that image are used to see what code would have to change if any or what docker images are compatible?

anner-emed avatar Aug 24 '22 16:08 anner-emed

I mean security wise is scary that serverless-offline has been hardcoded to use that lambci repos their docker images haven't been updated in 2 years and their github is equally stale.

you are right, those shouldn't be hard-coded ideally. since this plugin is for local development, security-wise it should be (more or less) "fine". that said, they are still outdated and unsupported runtimes.

I definetly suggest switching the image to something more reputable / maintained.

Agreed.

@dnalborczyk if i wanted to contribute fixing this what are the requirements for the image to have / include? What tools on that image are used to see what code would have to change if any or what docker images are compatible?

there shouldn't be any restrictions, although it might be best to get the official amazon images supported. if I remember correctly the very release of those made the lambci maintainer, unfortunately but also understandably, to give up.

the lambci images are pretty much more or less reverse engineered images of the prior unofficial amazon images. that's why I would imagine those would "just work".

dnalborczyk avatar Aug 25 '22 03:08 dnalborczyk

same problem here, i'd like to use serverless offline with node 16 or even 14. @dnalborczyk

AntonyOnScript avatar Sep 06 '22 12:09 AntonyOnScript

@AntonyOnScript serverless-offline supports node.js v14 and v16, just not running the lambda handler in a docker container with the lambda runtime.

dnalborczyk avatar Sep 10 '22 20:09 dnalborczyk

The issue is if you have mixed tech like Go and NodeJS you need to run them all with useDocker, or is it possible to have some functions run in Docker and some locally?

alexanderwink avatar Sep 11 '22 16:09 alexanderwink

The issue is if you have mixed tech like Go and NodeJS you need to run them all with useDocker, or is it possible to have some functions run in Docker and some locally?

it's not possible right now, but I agree, that's one of the pain points we should address eventually.

dnalborczyk avatar Sep 22 '22 00:09 dnalborczyk

We are no longer using lambci docker images.

DorianMazur avatar May 14 '24 09:05 DorianMazur