- Notifications
You must be signed in to change notification settings - Fork566
A Java wrapper to run Spring, Spring Boot, Jersey, and other apps inside AWS Lambda.
License
aws/serverless-java-container
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Theaws-serverless-java-container
makes it easy to run Java applications written with frameworks such asSpring,Spring Boot,Apache Struts,Jersey, orSpark inAWS Lambda.
Serverless Java Container natively supports API Gateway's proxy integration models for requests and responses, you can create and inject custom models for methods that use custom mappings.
Currently the following versions are maintained:
Version | Branch | Java Enterprise support | Spring versions | JAX-RS/ Jersey version | Struts support | Spark support |
---|---|---|---|---|---|---|
1.x | 1.x | Java EE (javax.*) | 5.x (Boot 2.x) | 2.x | ✅ | ✅ |
2.x | main | Jakarta EE 9-10 (jakarta.*) | 6.x (Boot 3.x) | 3.x | ❌ | ❌ |
3.x | Jakarta EE 11 (jakarta.*) | 7.x (Boot 4.x) | 4.x | ❌ | ❌ |
Follow the quick start guides inour wiki to integrate Serverless Java Container with your project:
- Spring quick start
- Spring Boot 2 quick start
- Spring Boot 3 quick start
- Apache Struts quick start
- Jersey quick start
- Spark quick start
Below is the most basic AWS Lambda handler example that launches a Spring application. You can also take a look at thesamples in this repository, our main wiki page includes astep-by-step guide on how to deploy the various sample applications using Maven andSAM.
publicclassStreamLambdaHandlerimplementsRequestStreamHandler {privatestaticfinalSpringLambdaContainerHandler<AwsProxyRequest,AwsProxyResponse>handler;static {try {handler =SpringLambdaContainerHandler.getAwsProxyHandler(PetStoreSpringAppConfig.class); }catch (ContainerInitializationExceptione) {// if we fail here. We re-throw the exception to force another cold starte.printStackTrace();thrownewRuntimeException("Could not initialize Spring framework",e); } }@OverridepublicvoidhandleRequest(InputStreaminputStream,OutputStreamoutputStream,Contextcontext)throwsIOException {handler.proxyStream(inputStream,outputStream,context); }}
- Java on AWS Lambda From Serverful to Serverless Java with AWS Lambda in 2 hours
- Spring on AWS Lambda YouTube Playlist from@plantpowerjames
About
A Java wrapper to run Spring, Spring Boot, Jersey, and other apps inside AWS Lambda.
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.