Or better yet, the Lambda function infrastructure ...
# sst
m
Or better yet, the Lambda function infrastructure ie stuff declared outside the handler, is invoked once per instantiation, while the handler itself can then be invoked multiple times until the container is killed off.
f
Hey @Mirza, yeah it’s the latter. The code outside of the handler is “global” code, it will run once when the Lambda container initially boots up. After the container boots up, the handler code will be called.
And when another request come it, the “global” code wont’ run, only the handler code will be called.
Let me pull in the author @Jay
m
Awesome, yes, assumed this was the case @Frank. Thanks for the clarification.
m
Thanks!