Skip to content

An AWS lambda layer with pre-built sharp node module

Notifications You must be signed in to change notification settings

matters-media/lambda-layer-sharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Sharp layer

This AWS lambda layer contains a pre-built sharp npm library.

Sharp version Layer size Zipped size
0.25.1 26MB 9.9MB

Getting

A built lambda zip file is available at dist/sharp-layer.zip.

Building

Dependencies

  • Docker

Steps

  1. Clone the repo:
    git clone git@github.com:Umkus/lambda-layer-sharp.git
    cd lambda-layer-sharp/
  2. Install dependencies:
    docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm ci
  3. Build the layer:
    docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x node ./node_modules/webpack/bin/webpack.js
  4. Import created layer into your AWS account:
    aws lambda publish-layer-version \
       --layer-name sharp --description "Sharp layer" \
       --license-info "Apache License 2.0" \
       --zip-file fileb://dist/sharp-layer.zip \
       --compatible-runtimes nodejs12.x

About

An AWS lambda layer with pre-built sharp node module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%