Skip to content
Lambdafication: Java to Lambda with annotations
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Termite is another research project of "Lambdafication" process after Podilizer in scope of Service Tooling initiative. We developed the library which would take care of automatic Lambda functions generating based on the the written code. This library could be used both in existing projects and in developing from scratch.


The idea of library is to use java custom annotations for marking and configuring Lambda functions. This approach allows to abstract the function creation process which helps developer to focus on the actual code writing. Java annotations have already proven themselves being used in successful projects, for instance Spring framework. We want to create a convenient tool with least configurations to simplify Lambdalizing process and help users to get involved into FaaS.


The library does two main jobs: creating functions and invoking them when it's needed.

To implement the first part we used java built-in annotation processor linked to custom annotation. Annotation processors are being performed over the compilation phase. It means that after compilation of your project marked with particular annotations methods are already created at provider's service (AWS Lambda as first implementation).

The invoking part of the library was implemented using java aspectj library, that allows to intercept the appropriate method call over the runtime phase and call already created Lambda function instead of the local method. Furthermore every function invocation starts in the new thread, it provides the use of the such strength of FaaS as auto-scaling.

Structure diagram

How to

Before using Termite directly from our Git repository, make sure to fulfil the following prerequisites:

  • AWS account and credentials configured at your machine (aws command-line tool should work: aws lambda list-functions)
  • JDK 1.8+ installed
  • Maven installed

Clone from repository (In the folder ‘example’ you can find example project which uses Termite):


Compile the project:

cd termite
mvn clean install

Afterwards, Termite is ready to be used within your Java application. Assuming you use Maven, create your own Maven project and configure dependencies. In case you use another build system, Termite does not offer integration yet but we are happy to accept patches of course.


Correct execution is able only with the following argument to the Maven execution plugin:


Also you need the generic Maven plugin for compiling generated sources because Termite will generate some source code files:


A full example of a Maven configuration file is located in the Termite repository at


Afterwards, you’re ready to go serverless! Annotate functions you want to upload with “@Lambda”, see the example above.

Compile the created project:

mvn clean install
You can’t perform that action at this time.