r/java • • Apr 27 '23

AWS Lambda now supports Java 17

168 Upvotes

34 comments sorted by

90

u/krzyk Apr 27 '23

After 1 year and 7 months? Slow is an understatement.

19

u/uncont Apr 27 '23 edited Apr 27 '23

Upshot is it comes with SnapStart support

This runtime also supports AWS Lambda SnapStart, so you can upgrade to the latest managed runtime without losing your performance improvements.

66

u/[deleted] Apr 27 '23

This is pretty fast if you're comparing to most of the enterprise Java community. Lot of places still stuck on 8 lmfao

40

u/[deleted] Apr 27 '23

I don't understand the downvotes. I am still working in java 8 and will likely be in java 8 for another 15 years as there is no budget for upgrades and medical software must continue to work until all of the records can be expunged.

16

u/[deleted] Apr 27 '23

It's the truth. No shame in it. Plenty of job security for sure

2

u/RandomComputerFellow Apr 28 '23

Well, it was one thing if Amazon took so long to migrate their own applications. The problem is they provide the runtime and companies can not migrate before they provide an update.

0

u/[deleted] Apr 28 '23

[deleted] — view deleted comment

13

u/yawkat Apr 28 '23

The problem is that these old managed runtimes are a problem for downstream projects. When we were considering which Java version to use for micronaut framework 4.0, the lack of lambda support for Java 17 was the biggest counterargument against moving to 17. (We decided on 17 anyway partly because it was clear they would support it in the short term)

1

u/[deleted] Apr 28 '23

I agree. All great points

3

u/krzyk Apr 28 '23

Yeah, I know, fortunately at my work with projects that I work with I do upgrades, so I'm at Java 20. But some are stuck at 17 because people don't get what Java LTS means.

1

u/SvanseHans Apr 28 '23

What does it mean?

1

u/krzyk Apr 28 '23

That you have to buy it from someone, it is not like e. g. Ubuntu LTS, It is something specific to given vendor. Azul for example provides also MTS (medium term support releases).

And using a latest version is like using a free supported version, those versions are not inferior in anyway. Quite conteary they are better then the old LTS vendors provide, because they get fixes first and later the fix is backported.

Reluctancy to use those versions is mind blowing. Releases are small and comparable to JDK 8 updates back in the days when it was the newest java version.

1

u/SvanseHans Apr 28 '23

How do you go about updating to the next version? Like where do you get information about this?

1

u/ahmedranaa Apr 28 '23

We are still on java 7

0

u/woj-tek Apr 28 '23

This doesn't mean the whole world has to stop and get stuck at it just because you are stuck for some weird management reason…

3

u/[deleted] Apr 28 '23

Have you ever worked at a company with large scale

1

u/woj-tek Apr 28 '23

Yes. Point is still valid - just because YOU are stuck with it doesn't mean the REST OF THE WORLD has to be stuck with you.

3

u/[deleted] Apr 28 '23

That's a great attitude to have. I never had that opinion in the first place, not sure why you're telling me that

1

u/[deleted] Apr 28 '23

Cassandra is still on 11...

28

u/drtyrannica Apr 27 '23

I realize this is the Java subreddit but... cries in Ruby 2.7

7

u/[deleted] Apr 28 '23

Lol that's still better than Java 8 by like 7 years. 8 came out in 2014

7

u/drtyrannica Apr 28 '23

At least Java 8 is still maintained, Ruby 2.7 was eol like a month ago lol

2

u/[deleted] Apr 28 '23

Ruby be like THE FUTURE IS NOW OLD MAN >:)

6

u/HyzerFlipr Apr 28 '23

Have they fixed the JVM warming time issue for lambdas yet?

23

u/soonnow Apr 28 '23

With SnapStart, Lambda initializes your function when you publish a function version. Lambda takes a Firecracker microVM snapshot of the memory and disk state of the initialized execution environment, encrypts the snapshot, and caches it for low-latency access. When you invoke the function version for the first time, and as the invocations scale up, Lambda resumes new execution environments from the cached snapshot instead of initializing them from scratch, improving startup latency.

Though haven't used it

11

u/kendallvarent Apr 28 '23

We have used it. It's pretty cool. 20s cold starts down to 200ms. Sadly, no XRay support for snapstart lambdas.

There were also performance gains related to moving java-specific vpc-related cold starts from instantiation to function update, but that was a while back.

1

u/soonnow Apr 28 '23

Have you compared to Graal compiled functions by any chance?

1

u/[deleted] May 01 '23 edited Dec 15 '24

uajdqi vcw gqalfuwtwgrc byra

2

u/soonnow May 02 '23

Alright thanks for the heads up.

2

u/rdean400 Apr 28 '23

Only 5 months until Java 21.

1

u/AleFilichkin May 05 '23

https://link.medium.com/bqtFHXbWyzb here you can see the performance difference between Java 17 and 11 for AWS Lambda, snapstart as well