Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep lambda warm using zappa python

I have an API function in python and deployed it on aws lambda using zappa. When I am hitting my API after 15 minutes time its taking atleast 5 to 10 seconds to respond (which is too long for my API) for first request. I have came to know about cold start issue in aws lambda. How to keep lambda warm using zappa python?

like image 453
naveen chary Avatar asked Oct 22 '25 17:10

naveen chary


1 Answers

Zappa has a default warmer that keeps invoking the lambda to avoid cold starts - check https://github.com/Miserlou/Zappa#advanced-usage (make sure keep_warm is set to true).

You can verify that there is a CloudWatch event rule of a scheduled event.

like image 79
Ronyis Avatar answered Oct 27 '25 06:10

Ronyis



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!