You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, first of all, thanks for your work on this module. It's a cool idea and very useful. I have been using this module and I've noticed increased Lambda cold start time simply by requiring this package. The cold start time was increased by over 500 ms so for an API it's quite high, I was wondering if it would be possible to refactor a bit and get rid of full lodash and aws-sdk require which slow things down?
Hi @andreafalzetti
Have you tried setting up a Lambda Layer with this module in it? This way your function itself gets smaller and can start in less time while the layer is only plugged with the function is ready.
@fuschini I am not sure that will help, at runtime this module requires the aws-sdk module which is loaded in memory - How is the Layer helping that? We are not talking about bundle size.
Respectfully, I thought the whole idea behind the module was the idea that it would NOT require aws-sdk as a dependency. When I tried to add it this library to my project, it now lists the aws-sdk as required. Is this a mistake? Thanks.
Hey, first of all, thanks for your work on this module. It's a cool idea and very useful. I have been using this module and I've noticed increased Lambda cold start time simply by requiring this package. The cold start time was increased by over 500 ms so for an API it's quite high, I was wondering if it would be possible to refactor a bit and get rid of full lodash and aws-sdk require which slow things down?
https://github.com/baseprime/dynamodb/blob/master/lib/index.js#L3
Results of my tests, first one without
dynamodb
with
dynamodb
ColdStart time was increased from ~250ms to ~900ms
Here, a good read about cost of requiring the full
aws-sdk
: https://theburningmonk.com/2019/03/just-how-expensive-is-the-full-aws-sdk/The text was updated successfully, but these errors were encountered: