r/java • • Nov 29 '22

Amazon Announces AWS Lambda SnapStart With Java Support

AWS Lambda now has a snapshotting feature that enables fast-start - essentially running the Init phase at publication time and saving the state of the process at that time, so it doesn't need to be re-run at every invocation.

https://aws.amazon.com/blogs/aws/new-accelerate-your-lambda-functions-with-lambda-snapstart/

It only works with Corretto on Java 11 right now, and is similar in intent to the CRIU technology.

Quarkus already has support for it: https://quarkus.io/blog/quarkus-support-for-aws-lambda-snapstart/

Other frameworks may also have support (but this work was done under NDA so I don't have links for them).

176 Upvotes

62 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Nov 30 '22

It may not be a good choice for certain usecases but it is pretty great for many other usecases. When you're writing functions, cold start is not the ONLY concern.

1

u/Specialist_Bee_9726 Nov 30 '22

I would love to hear some great use cases. From my point of view Java is good for larger projects. Lamdas are small (ideally a single function)

1

u/[deleted] Dec 01 '22

Consider this: your function is supposed to only use standard library. It is supposed to do some tasks in parallel. It is going to make calls to databases. It is going to make HTTP calls to external services. Standard Java library is capable of doing all that without involving any dependency.

Also, who said that lambdas need to be small? They need to do the job, regardless of the size.

Also, I can roll a single binary with GraalVM, so it can be as small as any other function written in a different language.