Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda extremely slow on imports

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?

like image 637
Zags Avatar asked Apr 28 '26 13:04

Zags


1 Answers

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.

like image 173
Zags Avatar answered Apr 30 '26 04:04

Zags



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!