A simple CLI for authoring AWS Lambdas in java
jlambda is a simple command line tool that lets you generate java project with all AWS lambda dependencies built-in. One can simply add business logic to the generated project and use jlambda once again to build a deployment package(.zip) and publish it to AWS . For now jlambda makes use of the AWSs' DefaultCredentialResolver to obtain credentials to publish the lambda
Java developers shy away from authoring AWS Lambda functions in Java owing to the inherent complexity in setting up the project and publishing it. Jlambda hopes to alleviate some or most of that pain. Jlambda is written in java for Java developers.
Usage: jlambda [-h] (-g=<path to generate lambda> | -b=<path to build package
to> | [-p=<publish> [-e=<env>]])
-b, --build=<path to build package to>
-e, --env=<env>
-g, --generate=<path to generate lambda>
-h, --help
-p, --publish=<publish>
Jlambda provides three commands
./jlambda -g /your/pathThis will generate a simple gradle java project with AWS Lambda dependencies pre-added. All you have to do is import the project .The Main class(AWS Lambda Handler) is by default atcom.lambda.basic.Handler.It also has adefault.propertiesfile that has all necessary lambda configuration.- You can create your own
<env>.propertiesto hold account specific configuration All that is left is to add logic to your function
- You can create your own
./jlambda -b /your/pathThis will build the java project at the specified location into a deployment package(.zip)../jlambda -p /your/pathwill build and publish the deployment package to AWS using the config given indefault.properties. Furthermore , you con use./jlambda -p /your/path -e <env>to deploy using environment specific configuration.
jlambda.aws.name=
jlambda.aws.handler=
jlambda.aws.role=
jlambda.aws.profile=
jlambda.aws.region=
jlambda.aws.access_key_id=
jlambda.aws.access_key_secret=
jlambda.aws.session_token=
jlambda.aws.mem=
jlambda.aws.timeout=
jlambda.aws.description=
jlambda.aws.subnets=
jlambda.aws.security_groups=
jlambda.aws.tracing_config=
You can download the executable for
- Linux from https://github.com/hemantgs/jlambda/releases/download/v0.0.5-alpha/jlambda-v0.0.5-alpha-linux
- MacOs from https://github.com/hemantgs/jlambda/releases/download/v0.0.5-alpha/jlambda-v0.0.5-alpha-mac
P.S. Right now this is tested only in linux