Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.58 KB

File metadata and controls

51 lines (33 loc) · 1.58 KB

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