Java sometimes doesn't seem to be a 1st class citizen when it comes to AWS Lambda, but with just a few considerations, it's easy to implement an efficient AWS Lambda function in Java. To become useful, we'll also put the Lambda function behind the AWS API Gateway, so that it can be called from the web (i.e. with an HTTP GET or POST request).
Once we have done that we'll push the code into a Github Repository and move the build and deployment process into AWS CodeBuild. This (still new) AWS service for Continuous Integration and Deployment (aka CI/CD) will pull the code from the Git Repo and build the artifact, puts it into an S3 bucket, from which it is deployed into AWS Lambda ...
Come on .. that's cool stuff: Software Development meets Dev Ops.