Skip to content

Umkus/lambda-layer-better-sqlite3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS better-sqlite3 layer

This AWS lambda layer contains a pre-built better-sqlite3 npm library. It is optimized for the smallest space usage possible.

better-sqlite3 version Layer size
7.1.0 0.87MB

Getting

A pre-built layer zip file is available at dist/better-sqlite3-layer.zip.

Building

Dependencies

  • Docker

Steps

  1. Clone the repo:
    git clone [email protected]:Umkus/lambda-layer-better-sqlite3.git
    cd lambda-layer-better-sqlite3/
  2. Install dependencies:
    docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm --no-optional --no-audit --progress=false install
  3. Build the layer:
    docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x node ./node_modules/webpack/bin/webpack.js
  4. Perform a smoke-test:
    docker run -w /var/task/dist/nodejs -v "$PWD":/var/task lambci/lambda:build-nodejs12.x node -e "console.log(require('better-sqlite3'))"
  5. Import created layer into your AWS account:
    aws lambda publish-layer-version --layer-name better-sqlite3 --description "better-sqlite3 layer" --license-info "Apache License 2.0" --zip-file fileb://dist/better-sqlite3-layer.zip --compatible-runtimes nodejs12.x

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published