Skip to content


Repository files navigation

Nimbus is a Java framework that allows for easy deployment and testing of serverless applications.


Nimbus is made available though maven and is hosted in the maven central repository.

First you need to add the nimbus-core dependency to your pom. This adds the annotation processor and local testing capabilities.


Next the deployment plugin needs to be added. Currently only AWS is supported, so the region parameter needs to be supplied to the plugin configuration.


You also need to use the maven shade plugin to package your project into a shaded jar:


Here the compiled jar will be placed at target/lambda.jar

Finally, an optional step is to create a nimbus.yml file in the top level of your project. This has only one parameter, projectName, that lets you customise the project name. For example:

projectName: nimbusExample

Caution: projectName needs to be alphanumeric.

Deployment Plugin Configuration Parameters

  • region - The AWS region that this project will be deployed to.

  • stage - The project stage that will be deployed to

  • shadedJarPath - The location where the shaded jar is found. Defaults to target/functions.jar.

  • compiledSourcePath - The location where compiled nimbus files are found. This will be in the compiled annotation sources. Defaults to target/generated-sources/annotations/ (Correct for default java projects, for other languages will likely change)

How to Deploy

To deploy to AWS you need to provide your AWS credentials. This can be done in three ways:

  • Environment variables–AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. The AWS SDK for Java uses the EnvironmentVariableCredentialsProvider class to load these credentials.

  • Java system properties–aws.accessKeyId and aws.secretKey. The AWS SDK for Java uses the SystemPropertiesCredentialsProvider to load these credentials.

  • The default credential profiles file– typically located at ~/.aws/credentials (location can vary per platform). For example:

aws_access_key_id = AKIAEXAMPLEKEY
aws_secret_access_key = s8sjhdf/sifys+EXAMPLEACCESSKEY

Then to deploy you need to package your project by running mvn package, and then deploy using mvn nimbus-deployment:deploy

This creates a new stack, and reports any new endpoints.

Sample application

Here we show the deployment of a simple HelloWorld application (assuming correct pom and nimbus.yml files)

public class HelloWorld {
    @HttpServerlessFunction(path="helloWorld", method=HttpMethod.GET)
    public String helloWorld() {
        return "Hello World!";

Now, we run mvn package.

After this we run mvn nimbus-deployment:deploy. On a successful run we get this output:

[info] Beginning deployment for project: HelloWorld, stage: dev
[info] Creating stack
[info] Polling stack create progress
[info] Stack created
[info] Uploading lambda file
[info] Uploaded file
[info] Uploading cloudformation file
[info] Uploaded file
[info] Updating stack
[info] Updated stack successfully, deployment complete
[info] Deployment completed
[info] Created REST API. Base URL is


Provide annotations to deploy JVM code to the cloud.







No packages published