The Wayback Machine - https://web.archive.org/web/20190501143133/https://github.com/awslabs/aws-serverless-java-container
Skip to content
A Java wrapper to run Spring, Jersey, Spark, and other apps inside AWS Lambda.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Adding issue template to repo Jan 12, 2018
aws-serverless-java-container-core [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-java-container-jersey [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-java-container-spark [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-java-container-spring [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-java-container-struts2 [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-jersey-archetype [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-spark-archetype [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-spring-archetype [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-springboot-archetype [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-springboot2-archetype [maven-release-plugin] prepare for next development iteration Feb 25, 2019
aws-serverless-struts2-archetype [maven-release-plugin] prepare for next development iteration Feb 25, 2019
samples Solve dependency issue with log4j2 and commons fileupload versions Feb 8, 2019
.gitignore Build script update to fail on errors from maven or gradle. Switched … Dec 22, 2018
.travis.yml Switched to wget and final url for gradle 5 Dec 22, 2018
CODE_OF_CONDUCT.md Added code of conduct doc. Feb 23, 2018
CONTRIBUTING.md Create CONTRIBUTING.md Feb 23, 2018
LICENSE Initial commit Dec 5, 2016
NOTICE Adding NOTICE file Feb 28, 2018
README.md Fixed typo in readme link for struts quickstart Oct 25, 2018
owasp-suppression.xml Fixed suppression for latest version of dep check plugin Dec 26, 2018
pom.xml [maven-release-plugin] prepare for next development iteration Feb 25, 2019
travis.sh Trying to manually install gradle 5 in build environment Dec 22, 2018

README.md

Serverless Java container Build Status Maven Central Help

The aws-serverless-java-container makes it easy to run Java applications written with frameworks such as Spring, Spring Boot, Apache Struts, Jersey, or Spark in AWS 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.

Follow the quick start guides in our wiki to integrate Serverless Java Container with your project:

Below is the most basic AWS Lambda handler example that launches a Spring application. You can also take a look at the samples in this repository, our main wiki page includes a step-by-step guide on how to deploy the various sample applications using Maven and SAM.

public class StreamLambdaHandler implements RequestStreamHandler {
    private static SpringLambdaContainerHandler<AwsProxyRequest, AwsProxyResponse> handler;
    static {
        try {
            handler = SpringLambdaContainerHandler.getAwsProxyHandler(PetStoreSpringAppConfig.class);
        } catch (ContainerInitializationException e) {
            // if we fail here. We re-throw the exception to force another cold start
            e.printStackTrace();
            throw new RuntimeException("Could not initialize Spring framework", e);
        }
    }

    @Override
    public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)
            throws IOException {
        handler.proxyStream(inputStream, outputStream, context);
    }
}
You can’t perform that action at this time.