GithubHelp home page GithubHelp logo

rjr-aws-lambda-base's Introduction

rjr-aws-lambda-base

Implements the API for a lambda layer: polls for input text, processes it, and posts back the result. It has the concept of a LambdaWorker, which is the class that does the work specific to that lambda, analogous to the RequestHandler when using the standard AWS java runtime.

This is just the runtime part. To see how to use it, look at the rjr-aws-lambda-dummy repo which has an example with a piece of code that just repeats Strings. (That repo's readme also has deployment instructions.)

This code is not intended as a general-purpose layer which can be deployed separately as a dynamic base for different lambdas. Instead it is always intended to be used as a dependency of a specific lambda's code, and compiled into a deployment package with it. Therefore it can avoid using reflection to instantiate the LambdaWorker at runtime.

There is a reflect-config.json file in META-INF/native-image for use with GraalVM native compilation.

I used this guide as my starting point, and my code is heavily based on it (though it's not in Kotlin):
'Fighting cold startup issues for your Kotlin Lambda with GraalVM' by Mathias Düsterhöft
I also used the AWS custom runtime API definition:
AWS Lambda Runtime Interface
which includes a link to a definition of the API in OpenAPI/Swagger format. I also used
'How to Deploy Java Application with Docker and GraalVM' by Vladimír Oraný
and various other web resources like the GraalVM docs and other AWS docs. And lots of StackOverflow, obvs.

todos

proper logging rather than System.out.println()?

rjr-aws-lambda-base's People

Contributors

annesadleir avatar mo-rjr avatar dependabot[bot] avatar

Stargazers

Serkan ÖZAL avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.