Thanks to visit codestin.com
Credit goes to github.com

Skip to content

unlayer/lambda-layer-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 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 [email protected]: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

About

An AWS lambda layer with pre-built sharp node module optimised for minimal layer size

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 75.1%
  • Dockerfile 24.9%