{"id":13527203,"url":"https://github.com/aws/serverless-java-container","last_synced_at":"2025-12-11T20:58:02.144Z","repository":{"id":14300557,"uuid":"75661534","full_name":"aws/serverless-java-container","owner":"aws","description":"A Java wrapper to run Spring, Spring Boot, Jersey, and other apps inside AWS Lambda.","archived":false,"fork":false,"pushed_at":"2025-05-06T19:29:11.000Z","size":3597,"stargazers_count":1518,"open_issues_count":75,"forks_count":565,"subscribers_count":70,"default_branch":"main","last_synced_at":"2025-05-08T00:08:05.856Z","etag":null,"topics":["api","api-gateway","api-server","aws","aws-lambda","jersey","rest-api","serverless","sparkjava","sparkjava-framework","spring"],"latest_commit_sha":null,"homepage":"https://aws.amazon.com/serverless/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-12-05T20:04:57.000Z","updated_at":"2025-05-07T10:24:51.000Z","dependencies_parsed_at":"2023-12-31T09:20:50.769Z","dependency_job_id":"6964f6e2-c648-4d60-bec1-75254260ae25","html_url":"https://github.com/aws/serverless-java-container","commit_stats":null,"previous_names":["aws/serverless-java-container","awslabs/aws-serverless-java-container"],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fserverless-java-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fserverless-java-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fserverless-java-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Fserverless-java-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/serverless-java-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969248,"owners_count":21992263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-gateway","api-server","aws","aws-lambda","jersey","rest-api","serverless","sparkjava","sparkjava-framework","spring"],"created_at":"2024-08-01T06:01:43.163Z","updated_at":"2025-12-11T20:58:02.138Z","avatar_url":"https://github.com/aws.png","language":"Java","readme":"# Serverless Java container [![Build Status](https://github.com/aws/serverless-java-container/workflows/Continuous%20Integration/badge.svg)](https://github.com/aws/serverless-java-container/actions) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.amazonaws.serverless/aws-serverless-java-container/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.amazonaws.serverless/aws-serverless-java-container) [![Help](http://img.shields.io/badge/help-gitter-E91E63.svg?style=flat-square)](https://gitter.im/aws/serverless-java-container)\nThe `aws-serverless-java-container` makes it easy to run Java applications written with frameworks such as [Spring](https://spring.io/), [Spring Boot](https://projects.spring.io/spring-boot/), [Apache Struts](http://struts.apache.org/), [Jersey](https://jersey.java.net/), or [Spark](http://sparkjava.com/) in [AWS Lambda](https://aws.amazon.com/lambda/).\n\nServerless 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.\n\nCurrently the following versions are maintained:\n\n| Version | Branch | Java Enterprise support     | Spring versions | JAX-RS/ Jersey version | Struts support | Spark support |\n|---------|--------|-----------------------------|-----------------|------------------------|----------------|---------------|\n| 1.x     | [1.x](https://github.com/aws/serverless-java-container/tree/1.x)    | Java EE (javax.*)           | 5.x (Boot 2.x)  | 2.x                    | :white_check_mark: | :white_check_mark: |\n| 2.x     | [main](https://github.com/aws/serverless-java-container/tree/main)   | Jakarta EE 9-10 (jakarta.*) | 6.x (Boot 3.x)  | 3.x                    | :x:            | :x:           |\n| 3.x     |    | Jakarta EE 11 (jakarta.*)   | 7.x (Boot 4.x)  | 4.x                    | :x:            | :x:           |\n\nFollow the quick start guides in [our wiki](https://github.com/aws/serverless-java-container/wiki) to integrate Serverless Java Container with your project:\n* [Spring quick start](https://github.com/aws/serverless-java-container/wiki/Quick-start---Spring)\n* [Spring Boot 2 quick start](https://github.com/aws/serverless-java-container/wiki/Quick-start---Spring-Boot2)\n* [Spring Boot 3 quick start](https://github.com/aws/serverless-java-container/wiki/Quick-start---Spring-Boot3)\n* [Apache Struts quick start](https://github.com/aws/serverless-java-container/wiki/Quick-start---Struts)\n* [Jersey quick start](https://github.com/aws/serverless-java-container/wiki/Quick-start---Jersey)\n* [Spark quick start](https://github.com/aws/serverless-java-container/wiki/Quick-start---Spark)\n\nBelow is the most basic AWS Lambda handler example that launches a Spring application. You can also take a look at the [samples](https://github.com/aws/serverless-java-container/tree/master/samples) in this repository, our main wiki page includes a [step-by-step guide](https://github.com/aws/serverless-java-container/wiki#deploying-the-sample-applications) on how to deploy the various sample applications using Maven and [SAM](https://github.com/awslabs/serverless-application-model).\n\n```java\npublic class StreamLambdaHandler implements RequestStreamHandler {\n    private static final SpringLambdaContainerHandler\u003cAwsProxyRequest, AwsProxyResponse\u003e handler;\n\n    static {\n        try {\n            handler = SpringLambdaContainerHandler.getAwsProxyHandler(PetStoreSpringAppConfig.class);\n        } catch (ContainerInitializationException e) {\n            // if we fail here. We re-throw the exception to force another cold start\n            e.printStackTrace();\n            throw new RuntimeException(\"Could not initialize Spring framework\", e);\n        }\n    }\n\n    @Override\n    public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)\n            throws IOException {\n        handler.proxyStream(inputStream, outputStream, context);\n    }\n}\n``` \n\n## Public Examples\n\n### Blogs\n\n- [Re-platforming Java applications using the updated AWS Serverless Java Container](https://aws.amazon.com/blogs/compute/re-platforming-java-applications-using-the-updated-aws-serverless-java-container/)\n\n### Workshops\n\n- [Java on AWS Lambda](https://catalog.workshops.aws/java-on-aws-lambda) From Serverful to Serverless Java with AWS Lambda in 2 hours\n\n### Videos\n\n- [Spring on AWS Lambda](https://www.youtube.com/watch?v=A1rYiHTy9Lg\u0026list=PLCOG9xkUD90IDm9tcY-5nMK6X6g8SD-Sz) YouTube Playlist from [@plantpowerjames](https://twitter.com/plantpowerjames)\n\n### Java samples with different frameworks \n\n- [Dagger, Micronaut, Quarkus, Spring Boot](https://github.com/aws-samples/serverless-java-frameworks-samples/)\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fserverless-java-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Fserverless-java-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Fserverless-java-container/lists"}