News for hackers. Stuff that matters.

Ask HN: Python Serverless Functions?

We're working on a project that requires handling and responding to events. Is there a way to deploy Python functions similar to CloudFlare JavaScript workers? AWS Lambda cold starts are unacceptable to us.
( 10 comments | 4 points | on HN )
Re:Ask HN: Python Serverless Functions? by killingtime74 on Tuesday June 13, 2023 @05:44PM (#36317922)
Cold starts have been optional in lambda for several years now... You can pay to keep it warm. Even before that there were open source projects that poked the lambda on a schedule to keep them warm
Re:Ask HN: Python Serverless Functions? by gyanreyer on Tuesday June 13, 2023 @05:40PM (#36317872)
Cloudflare has an example project where you can write a worker in python and have it transpiled to JavaScript, but that feels a little funky. https://github.com/cloudflare/python-worker-hello-world
Re:Ask HN: Python Serverless Functions? by jcz_nz on Tuesday June 13, 2023 @06:02PM (#36318192)
Have you considered App Engine?

GCP has "cloud functions" but it's just a python cloudrun container behind the scenes, with all the associated issues. We found it's easier to just use cloudrun.

Re:Ask HN: Python Serverless Functions? by riyakhanna1983 on Tuesday June 13, 2023 @06:10PM (#36318287)
We have not, but suspect that cold starts would be worse for GAE apps.
Re:Ask HN: Python Serverless Functions? by icedchai on Tuesday June 13, 2023 @06:55PM (#36318777)
You can use provisioned concurrency w/ Lambda. You still may get "cold starts" when you exceed what you've provisioned, so you'll want to over-provision.
Re:Ask HN: Python Serverless Functions? by riyakhanna1983 on Tuesday June 13, 2023 @07:30PM (#36319131)
[MORE: cannot edit] We're looking to cut down our Cloud costs, so over provisioning to make up for cold starts is not an option for us. Curious to know how others are in the same situation and
Re:Ask HN: Python Serverless Functions? by abyesilyurt on Wednesday June 14, 2023 @01:08AM (#36321679)
How about Cloud Run with minimum instances?
Re:Ask HN: Python Serverless Functions? by nathants on Wednesday June 14, 2023 @05:56PM (#36333332)
for lambda, use zip not container, much faster cold starts.
Re:Ask HN: Python Serverless Functions? by ruskyhacker on Thursday June 15, 2023 @03:43AM (#36337529)
Azure function apps
Re:Ask HN: Python Serverless Functions? by leros on Thursday June 15, 2023 @11:20AM (#36341798)
You can compile your Python to WebAssembly and run the WebAssembly in Cloudflare workers.