GithubHelp home page GithubHelp logo

serverless-graal-scala's Introduction

Serverless Graal Scala Demo

This demo project uses GraalVM to compile a simple Scala project into a single native executable file. As a result, the application can run without Java/JVM installed in the target machine.

See Bootstrap.scala

It utilizes the new AWS Lambda Runtime API to call the native executable as a Lambda Function.

Deployment is powered and managed by the Serverless Framework.

Prerequisites

  1. Linux development machine - This project builds a native binary that is deployed to AWS so it must run in a Linux machine.
  2. Install NodeJS and the Serverless Framework
  3. Amazon Web Services account

You also need to setup your AWS credentials/profiles in the ~/.aws/credentials file.

[dev]
aws_access_key_id = XXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXX
region = us-east-1

Build

To build the project, run ./gradlew clean build.

This will download all of the project and build dependencies including the GraalVM SDK and will create a native executable file named bootstrap in the build/graal directory.

Deploy

To deploy, simply run sls deploy. This demo project will create 2 lambda functions: echo and reverse:

To invoke the functions, run:

sls invoke -f echo -d 'hello'
sls invoke -f reverse -d 'hello'

serverless-graal-scala's People

Contributors

bytekast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

glngn dantodor

serverless-graal-scala's Issues

HTTP Endpoint missing

This is really nice, exactly what I've been looking for!

The only missing thing is the http endpoint. Can you add it?

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.