Closed LewisCowlesMotive closed 3 months ago
Hi @LewisCowlesMotive. I'm not following, are you trying to use sandbox-pnc-gateway-nodejs layer and run with LLRT?
Hi Richard, Not quite, although it does run under nodeJS. If I switch the runtime to the 2023 amazon that does not have nodeJS, and have used the arm64 zip (it's an arm64 lambda) nodejs code doesn't "just run"; so I'm wondering if there might be lower-level steps to use this with say a hello-world or one of the standard AWS examples that talk to dynamoDB, or other network services.
The key thing is. Given some JS that works. Without esbuild or typescript. What does someone need to do, to test if this has any performance impact at all?
Hi Richard, Not quite, although it does run under nodeJS. If I switch the runtime to the 2023 amazon that does not have nodeJS, and have used the arm64 zip (it's an arm64 lambda) nodejs code doesn't "just run"; so I'm wondering if there might be lower-level steps to use this with say a hello-world or one of the standard AWS examples that talk to dynamoDB, or other network services.
The key thing is. Given some JS that works. Without esbuild or typescript. What does someone need to do, to test if this has any performance impact at all?
Ah I see. I would recommend to checkout our SAM examples. That should give you a pretty good idea what to do. In summary:
bootstrap
file from the zip above.Amazon Linux 2023
inside Lambda.It's the bootstrap from the zip above I'm missing. we're doing the other stuff. So Bootstrap will take our code and launch it via the different runtime?
I Had mounted the zip as a lambda layer, and then copied the handler from the SAM example.
Kind of, I recommend reading here: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html
@LewisCowlesMotive I'm closing now. Feel free to add comments here if you still need help :)
It would be really great to get an example of using this using raw JS with no esbuild step. My code works in Node 20, but fails if attempting to use this layer on the 2023 image that has no language runtime, even with the arm64 code added as a layer.
arn
arn:aws:lambda:us-east-1:667977005188:function:sandbox-pnc-gateway-nodejs
Just trying to see if NodeJS can operate even close to where Python 3.11 image is operating