GithubHelp home page GithubHelp logo

afronski / state-of-jvm-on-aws-lambda Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 194 KB

Repository with materials for my talk titled "The State of JVM on AWS Lambda".

Home Page: https://awsmaniac.com

License: MIT No Attribution

Makefile 6.26% JavaScript 10.49% TypeScript 43.03% Java 29.07% Clojure 10.99% Shell 0.15%
aws aws-lambda aws-lambda-custom-runtime clojure corretto corretto11 graalvm holy-lambda java java-11

state-of-jvm-on-aws-lambda's Introduction

Source Code for the talk "The State of JVM on AWS Lambda"

This is a repository that contains demos for the set of best practices related to deployment of JVM-based applications to AWS Lambda, and comparing this with a baseline in Node.js.

It includes optimized runtimes, JVM compilation tweaks (including JIT), and AoT compilation with GraalVM. To not make this artificially bound only to Java it additionally contains similar examples in Clojure.

Prerequisites

  • Pre-installed tools:
    • Most recent AWS CLI.
    • Most recent AWS SAM.
    • AWS CDK in version 2.x or higher.
    • OpenJDK 11 or higher (ideally Amazon Corretto 11.x).
    • Gradle 5.x or higher.
    • Node.js v16.x or higher.
  • Configured profile in the installed AWS CLI for your AWS IAM User account of choice.
  • Last, but not least - do either of two (I prefer the latter):
    • Deploy AWS Lambda Power Tuning state machine as requested here.
    • Deploy AWS Lambda Power Tuner UI as it is described here.
  • Deploy this layer to your AWS account in the region where you will deploy your stacks.
    • Note down the ARN of the layer as you will need that later.

How to use that repository?

# After checking out the repository - do it in a single terminal session ...

$ make
$ source ./.env/bin/activate

$ cd sources
$ make

$ cd ../infrastructure
$ npm install

$ export AWS_USERNAME=<YOUR_IAM_USERNAME>
$ export BABASHKA_RUNTIME_LAYER_ARN=<ARN_YOU_HAVE_NOTED_DOWN>

$ cdk bootstrap

$ npm run package
$ cdk deploy Infrastructure-Shared       # Get the repository URL from the outputs.

# Generate AWS CodeCommit HTTPS credentials in the AWS IAM for your user.

$ git remote add aws https://...         # Put that repository URL here.
$ git push aws main

$ npm run deploy

From now on everything can be done from the AWS Cloud9 that is set up by the infrastructure as code used above.

If you are interested in seeing relevant slides, contact me directly.

License

Authors

state-of-jvm-on-aws-lambda's People

Contributors

afronski avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.