There's some lambda layers released that allow you...
# sst
j
There's some lambda layers released that allow you to have a runtime greater than 14 https://github.com/fusebit/everynode I'm trying to use it in sst but it requires I use
runtime: lambda.Runtime.PROVIDED
but
sst.Function
doesn't allow it. Is there some workaround I can do apart from just using the cdk constructs directly? I really need to use node v16... I'm guessing provided runtimes aren't allowed because of the local dev stuff but if it's node I think it shouldn't make a difference?
f
I see. Yeah that makes sense. If the
PROVIDED
runtime is Node, Live Lambda debug should just work.
Let me put this on the roadmap… we might not be able to get to this right away.
j
Thanks @Frank. Is it possible to put in a quicker fix that allows it when enableLiveDev is false? Just so we can take advantage of the bundler
f
Can you try setting the function as
nodejs14.x
with the everynode layer, and then update the runtime manually after the function is bundled? ie.
Copy code
const myFn = new sst.Function(this, "MyFunction", { ... });
myFn.node.defaultChild.runtime = "provided";

// or in Typescript
(myFn.node?.defaultChild as lambda.CfnFunction).runtime = "provided";
j
I have moved onto something else for now so couldn't test extensively but it looked like the above method of updating the runtime manually after works. It didn't work in the sst console, I couldn't see logs, but there were no build or deployment errors