serverless-offline
serverless-offline copied to clipboard
Workaround for node 18 and using docker?
Hi,
Is there any workaround or tipe for using node 18 and testing with useDocker
?
@OscBacon Seems like I am having the same issue, cannot use lambda layers in serverless-offline. Looks like the base image of docker used by serverless-offline for Node 18 is deprecated : https://github.com/lambci/docker-lambda for https://github.com/aws/aws-lambda-base-images
Hopefully team responds soon with some workarounds.
serverless-offline
is currently using lambci
images for Docker, as @fahimuddin-brillmark mentioned, which were abandoned a long while ago and haven't been updated in years. Serverless itself is in the same situation with its serverless invoke local
- it is still currently using lambci
too. I did a write-up about what it would take to update that codebase to using the latest AWS images and feel it's pretty relevant here too: https://github.com/serverless/serverless/issues/10797#issuecomment-1544922990
Key takeaways are that the mapping a handler to a Lambda runtime container isn't just as simple as a string replacement or templating any longer (requiring a bit of logic), and the internals workings of the containers are understandably different.
My use case was looking at getting Go working under provider.al2
(the current runtime since go1.x
is EOL), and as with Serverless itself, some work would be needed to make serverless-offline
compatible, although I did start with #1691.
thanks @davidjb - helped me a lot :)
@OscBacon @davidjb @manfioLP @fahimuddin-brillmark This should now be fixed. I just merged a PR that solves this issue - #1755