Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NotificationsYou must be signed in to change notification settings

unroll-io/lambda-layer-sharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This AWS lambda layer contains a pre-builtsharp npm library.It is optimized for the most frugal space usage possible.

Sharp versionLayer size
0.26.09.68MB

Getting

A pre-built layer zip file is available atdist/sharp-layer.zip.

Building

Dependencies

  • Docker

Steps

  1. Clone the repo:
    git clone git@github.com:Umkus/lambda-layer-sharp.gitcd lambda-layer-sharp/
  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('sharp'))"
  5. 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

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript100.0%

[8]ページ先頭

©2009-2025 Movatter.jp