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
Frank
03/11/2022, 9:33 AM
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.
Frank
03/11/2022, 9:34 AM
And when another request come it, the “global” code wont’ run, only the handler code will be called.
Frank
03/11/2022, 9:35 AM
Let me pull in the author @Jay
m
Mirza
03/14/2022, 3:43 AM
Awesome, yes, assumed this was the case @Frank. Thanks for the clarification.