node 20
thx for this, was gonna use it to write parquet to s3 from a lambda i'm calling from a redshift udf :) then read it back in via spectrum... get around the stupid max return length issue. noticed it doesnt have node 20 in it yet
Have tried this with node 20 and node 18, get the error " "Error: /var/package.jsondoes not exist", " at Object.dn.find (/tmp/tmpvgosqr6x/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js:19:11)". Are you seeing the same?
How exactly are you bundling/deploying? You don’t need to have the DuckDB Package bundled if you’re using the layer. The error message IMO can’t come from the layer because node-pre-gyp isn’t even used.
See https://github.com/tobilg/serverless-duckdb for an example how to deploy it with the Serverless Framework.
I’m just making a lambda function and editing the code in the console. I’m not doing any “deployment” to lambda. It’s just a blank lambda function with a few lines of code, I want to add the layer to it but have to use an old version of node or else I can’t add the layer in the console.
The Layer itself is only necessary for Node versions below 20, that’s why it‘s only configured for those: https://github.com/tobilg/duckdb-nodejs-layer/blob/62a07937740d93ecde4c807572754982dca16707/publish_layer.sh#L10
With Node 20 you should be able to use the Standard npm package.
Thanks for the insights, will give it another try.