forked fromUmkus/lambda-layer-sharp
- Notifications
You must be signed in to change notification settings - Fork0
unlayer/lambda-layer-sharp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This AWS lambda layer contains a pre-builtsharp npm library.It is optimized for the most frugal space usage possible.
A pre-built layer zip file is available on theReleases page, alongside the size of the layer.
- Docker
- Clone the repo:
git clone git@github.com:Umkus/lambda-layer-sharp.gitcd lambda-layer-sharp/
- Install dependencies:
docker run -v"$PWD":/var/task lambci/lambda:build-nodejs12.x npm --no-optional --no-audit --progress=false install
- Build the layer:
docker run -v"$PWD":/var/task lambci/lambda:build-nodejs12.x node ./node_modules/webpack/bin/webpack.js
- 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('sharp'))"
- 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 optimised for minimal layer size
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Languages
- JavaScript75.1%
- Dockerfile24.9%