DEV Community

Spring Boot 3 application on AWS Lambda - Part 1 Introduction to the series

What we will explore and learn throughout the series?

Let me introduce to you my new series. "Spring Boot 3 application on AWS Lambda".

In the course of the series, we'll use Java 21 runtime to demonstrate multiple ways how to run and optimize Spring Boot 3 (and at the time of writing the latest major Spring Boot version is 3.2) application on AWS Lambda. You can easily adopt the examples to the newer Spring Boot version when it will be released.

In the upcoming articles we'll explore the following ways to run Spring Boot 3 application on AWS Lambda using the following frameworks, technologies or concepts:

  • AWS Serverless Java Container
  • AWS Lambda Web Adapter
  • Spring Cloud Function
  • Custom Docker Image

For each of this we'll introduce the concept first, then how to develop, deploy and run our application using each approach and also how to optimize the application with Lambda SnapStart (including various priming techniques) if available (currently not available on the Docker Container images). We'll also explore GraalVM Native Image using Spring Cloud Function deployed as the AWS Lambda Custom Runtime as the optimization technique.

Of course, we'll measure and the cold and warm start times of the Lambda function using all mentioned approaches and compare all introduced solutions.

Last but not least we'll explore whether Spring Boot 3 native support of CRaC is also a valid approach. We'll also make a comparison of the all introduced frameworks and concepts.

You can already find code samples for the entire series in AWSLambdaJavaWithSpringBoot repository of my GitHub account.

In the next part of the series we'll introduce AWS Serverless Java Container.

Top comments (0)