Skip to content

ziedbentahar/lambda-llrt-with-terraform-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLRT with terraform sample

This repo provides a working sample of a serverless aws lambda based application that uses LLRT javascript runtime. This sample includes also a fully working IaC with terraform.

This project can serve as a template for new serverless applications using:

Warning

LLRT is an experimental runtime and not fully compatible with Node.js. Some modules are not expected to work properly. You can find more on the Node.js/LLRT compatibility matrix here here

sample architecture overview

Repository Organization

  • infra/: IaC with terraform.

  • src/: The source code of the lambda functions in typescript:

    • build.sh build script that:

      • Downloads the LLRT from the official LLRT github repo
      • Bundles lambda code with esbuild
      • Adds the LLRT bootstrap to the build output
    • esbuild.config.js The esbuild config

    • orders: Sample code that performs super basic CRUD operations

Building & deploying this sample

# building the project

npm --prefix ./src install
npm --prefix ./src run build

# deploying the project

terraform -chdir=./infra init
terraform -chdir=./infra validate
terraform -chdir=./infra apply

Note

A fully functional sample github pipeline coming next

About

A working sample of a serverless Lambda based application that uses LLRT javascript runtime. This sample includes also a fully working IaC with terraform.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published