/serverless-java-emu

This project allows to emulate AW API Gateway and AWS lambda locally on your computer, for Java based Lambdas

Primary LanguageJava

The Serverless API Java emulator

This project emulates AWS API Gateway and AWS lambda, for Java based Lambdas. It enables fast and convenient testing of your APIs, both locally on your computer and also remotely after deployment.

Installation

The Serverless API Java emulator (aka SAJ) is available on the maven central repository, so using it is a matter of including 1 dependency in your tests:

<dependency>
    <groupId>com.agileandmore</groupId>
    <artifactId>com.agileandmore.slsemulator</artifactId>
    <version>1.3</version>
    <scope>test</scope>
</dependency>

and one dependency in your production code:

<dependency>
    <groupId>com.agileandmore</groupId>
    <artifactId>com.agileandmore.slsruntime</artifactId>
    <version>1.0</version>
</dependency>

If you would like to compile SAJ yourself:

cd sls-runtime
mvn clean install
cd ../sls-emulator
mvn clean install

However, be aware that this will result in snapshot versions, so you'll have to adapt the pom files.

Usage

As SAJ is meant to be used as part of a testing strategy, the best place to get started is the WIKI and then follow with the Tutorial.

Contributing

If you would like to contribute to this project, the best way currently is to post change requests, suggestions or bugs through github.

License

The com.agileandmore.slsruntime module is covered by the Apache License 2.0, as it's going to be embedded in your production code and requires a permissive license.

The com.agileandmore.slsemulator module is covered by the GNU GPL V3 license, as it's used only in the scope of your tests and is normally not shipped in production.