Will the cold starts of my AWS Lambda function take longer if I use a image from ECR instead of a jar from S3 as my source code? I'm thinking that yes, because the image is larger due to the additional OS layer (even though... the regular Lambda should have some OS layer as well), but I couldn't find any performance benchmarks.
Thanks!
I'm surprised at the conclusion of the other answers here.
IT DEPENDS
Linked earlier, this blog post performs data tests. From that post:
If your function is a pure function. It'll perform way better (1st picture) as most have said, but once your function acts more like a Framework the size of the zip grows and all it takes is a few megs and S3 is simply too slow.
To be clear, your container/program needs to have a fast start time, but that's irrespective of the size or lambda.
That second graph is incredible, 5GB container loading in < 2s
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With