Code Example Updates For "Programming AWS Lambda"

Symphonia
Mike Roberts
Nov 24, 2025

Back in early 2020 John and I published our book on using AWS Lambda with Java. Most of the book holds up well, but one thing that didn’t was the code examples, so I’ve made a few updates to the example repo.

The main change was updating the Java version from 8 to 21. Java 25 support for Lambda just got announced but it’s a little too soon for me to start using that by default. There are quite a few opportunities to improve the readability of code between Java 8 and 21, but I mostly stuck to switching a few things to use the var keyword.

Another big change was that the V1 AWS SDK we used in the book is moving to “End of support” this year, and so I updated the code to use V2 of the SDK. The syntax in V2 is quite different so I needed to make a few updates related to that.

There were also various other library and tool updates, including switching to JUnit 5, which also required some code updates.

If I was actually going to write a second edition of the book I’d change a lot more, including using AWS Powertools; giving examples of deploying with SnapStart; and including at least something on using CDK for deployment. But because I wanted to keep the code examples close to what’s in the book I skipped these.

I know some folk are still coming to the book for the first time, which makes me happy. I hope it’s got a few years left in it yet!

Feedback + Questions

If you have any feedback or questions then feel free to email me at mike@symphonia.io, or contact me at @mikebroberts@hachyderm.io on Mastodon, or at @mikebroberts.com on BlueSky.