r/SpringBoot • • Aug 26 '26

Discussion How do you deploy a spring boot application to AWS Lambda?

Hi

I am looking for advices and feedback on how to deploy Spring Boot web application to AWS Lambda, especially around making the Spring Boot main class compatible with AWS Lambda runtime.

I figured out the part where the Spring Boot application has to be packaged as a zip file to de deployed into the AWS Lambda environment, so that part is clear.

So far what I have found is that you need to have some kind of AWS Lambda dependency like lambda StreamHandler or web adapter on your Spring Boot project to make it compatible with the AWS lambda runtime.

While these may be the way to go but I am specifically looking for feedback if it is possible to integrate Spring Boot web application without using any AWS Lambda specific Java dependency. Just take a normal Spring Boot main application and make it run on AWS Lambda runtime. Is this possible at all or am I overthinking?

Appreciate your feedback

29 Upvotes

42 comments sorted by

View all comments

Show parent comments

1

u/Historical_Ad4384 Aug 26 '26

I tried to build a graalvm image for a core Java application and it worked. The same pattern is failing for my springtime not application to compile graalvm. I'm running into new surprises to every now and then.

0

u/MkMyBnkAcctGrtAgn Aug 26 '26

I was under the impression it was supported out of the box by spring nowadays, but I've never used it. There should be docs on the spring website showing how they expect it to be done

0

u/BikingSquirrel Aug 26 '26

Well, supported doesn't mean it works unchanged. It is an investment and I wouldn't bet on it without good test coverage - integration tests against the GraalVM image!