Reputation: 41180
I have an AWS lambda function that is taking over a minute just to run imports. My code is doing nothing in the global scope that I can tell. How do I fix this?
Upvotes: 3
Views: 1415
Reputation: 41180
Increase the memory limit of the lambda. If the instance is memory constrained, it will run much slower. Additionally (as @Michael points out in the comments), the amount of CPU available to a lambda is proportional to its memory allocation.
Upvotes: 3