Giter Club home page Giter Club logo

aws-lambda-java-libs's Introduction

AWS Lambda Java Support Libraries

Key libraries for running Java on the AWS Lambda platform.

For issues and questions, you can start with our FAQ and the AWS questions and answer site re:Post

To get started writing Lambda functions in Java, check out the official developer guide.

For information on how to optimize your functions watch the re:Invent talk Optimize your Java application on AWS Lambda.

Core Java Lambda interfaces - aws-lambda-java-core

This package defines the Lambda Context object as well as interfaces that Lambda accepts.

Example request handler

public class Handler implements RequestHandler<Map<String, String>, String>{
 @Override
 public String handleRequest(Map<String, String> event, Context context) {

 }
}

Example request stream handler

public class HandlerStream implements RequestStreamHandler {
  @Override
  public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context) throws IOException {

  }
}
<dependency>
 <groupId>com.amazonaws</groupId>
 <artifactId>aws-lambda-java-core</artifactId>
 <version>1.2.3</version>
</dependency>

Java objects of Lambda event sources - aws-lambda-java-events

This package defines event sources that Lambda natively accepts. See the documentation for a list of currently supported event sources. Using this library you can have Java objects which represent event sources.

For example an SQS event:

import com.amazonaws.services.lambda.runtime.events.SQSEvent;

public class SqsHandler implements RequestHandler<SQSEvent, String> {

 @Override
 public String handleRequest(SQSEvent event, Context context) {

 }
}
<dependency>
 <groupId>com.amazonaws</groupId>
 <artifactId>aws-lambda-java-events</artifactId>
 <version>3.11.6</version>
</dependency>

Java Lambda JUnit Support - aws-lambda-java-tests

This package provides utils to ease Lambda Java testing. It uses the same Lambda serialisation logic and aws-lambda-java-events to inject events in your JUnit tests.

@ParameterizedTest
@Event(value = "sqs/sqs_event.json", type = SQSEvent.class)
public void testInjectSQSEvent(SQSEvent event) {
        ...
}
<dependency>
  <groupId>com.amazonaws</groupId>
  <artifactId>aws-lambda-java-tests</artifactId>
  <version>1.1.1</version>
  <scope>test</scope>
</dependency>

aws-lambda-java-events-sdk-transformer

This package provides helper classes/methods to use alongside aws-lambda-java-events in order to transform Lambda input event model objects into SDK-compatible output model objects. See the documentation for more information.

<dependency>
 <groupId>com.amazonaws</groupId>
 <artifactId>aws-lambda-java-events-sdk-transformer</artifactId>
 <version>3.1.0</version>
</dependency>

Java Lambda Log4J2 support - aws-lambda-java-log4j2

This package defines the Lambda adapter to use with Log4J version 2. See the README or the official documentation for information on how to use the adapter.

<dependency>
 <groupId>com.amazonaws</groupId>
 <artifactId>aws-lambda-java-log4j2</artifactId>
 <version>1.6.0</version>
</dependency>

Java implementation of the Runtime Interface Client API - aws-lambda-java-runtime-interface-client

This package defines the Lambda Java Runtime Interface Client package, a Lambda Runtime component that starts the runtime and interacts with the Runtime API - i.e., it calls the API for invocation events, starts the function code, calls the API to return the response. The purpose of this package is to allow developers to deploy their applications in Lambda under the form of Container Images. See the README for information on how to use the library.

<dependency>
 <groupId>com.amazonaws</groupId>
 <artifactId>aws-lambda-java-runtime-interface-client</artifactId>
 <version>2.5.1</version>
</dependency>

Java Lambda provided serialization support - aws-lambda-java-serialization

This package defines the Lambda serialization logic using in the aws-lambda-java-runtime-client library. It has no current standalone usage.

<dependency>
 <groupId>com.amazonaws</groupId>
 <artifactId>aws-lambda-java-serialization</artifactId>
 <version>1.1.5</version>
</dependency>

Disclaimer of use

Each of the supplied packages should be used without modification. Removing dependencies, adding conflicting dependencies, or selectively including classes from the packages can result in unexpected behavior.

aws-lambda-java-libs's People

Contributors

carlzogh avatar bmoffatt avatar smirnoal avatar msailes avatar andclt avatar dtorok avatar anton-stepanof avatar zsombor-balogh avatar asuresh8 avatar dependabot[bot] avatar stefanbotez avatar jeromevdl avatar sukanyahanumanthu avatar keshayad avatar vinayaksood avatar prajesh1 avatar richarddd avatar jccarrillo avatar hyandell avatar muellerc avatar timgustafson avatar tolledo avatar render3d avatar senioroman4uk avatar zabrip avatar alexaiss avatar bradleylyman avatar cayua avatar github-actions[bot] avatar gxstv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.