iopipe / serverless-plugin-iopipe

Automatically wrap your serverless framework functions with IOpipe
https://www.iopipe.com
Apache License 2.0
40 stars 8 forks source link

fix(handler files): move require block outside of handler for best lambda cold start performance #80

Closed coreylight closed 6 years ago

coreylight commented 6 years ago

By moving the require block outside of the handler, AWS can properly use performance enhancements on their side to optimize the cold start.

fix #77

coreylight commented 6 years ago

@kolanos the try/catch on require statements is the only mechanism to catch these types of errors that I know of. I'm not sure what kind of documentation you're looking for? We surface the error that is caught to IOpipe (as it does currently).