Re:Running Containers on AWS Lambda
by jamesfinlayson on Thursday April 28, 2022 @12:03AM
(#31188597)
Someone here recently said that the Lambda Python runtime is not stock Python (apparently it's compiled without optimisations: https://news.ycombinator.com/item?id=30953202) - maybe that has something to do with it?
Re:Running Containers on AWS Lambda
by jaimehrubiks on Sunday May 01, 2022 @01:17PM
(#31226739)
It definitely could, we are talking in the order of ~10ms, even the version of python over the years can mean such improvement (or better depending on the code of course).
I was interested on the cold starts though. I will have to experiment in the future.
Sorry don't know about nodejs yet. This was for a new lambda that wasn't in production yet, so it made sense to experiment.
The increase in speed was unexpected but nice. But we're also assuming this increase is a static ~10ms speedup, and not a 20% speedup, but we only tested one lambda. I'm interested to see Adam's followup post and see if I'm wrong about that.
Oh also just want to say, since the workings of lambda are hidden, it could be some totally different reason why containers perform better. Since its a newer feature, maybe it's running a newer version of the backend that the zip file backend will be moved to. Maybe container-based lambdas are allocated on newer hardware. Maybe containers are actually just faster. Can't ever really know without getting hired by Amazon and signing an NDA, lol.