Skip to content

bubblydoo/lambda-layer-sharp

 
 

Repository files navigation

AWS Lambda layer for Sharp

Releases Build Layer ZIP

This AWS Lambda layer contains a pre-built Sharp binary. New releases are automatically published in this repository on each Sharp update.

Download

A pre-built layer zip file is available on the Releases page, alongside the size of the layer. Zip files for both x86_64 and arm64 are available.

Build

Dependencies

  • Docker

Steps

  1. Clone the repo:
    git clone git@github.com:bubblydoo/lambda-layer-sharp.git
    cd 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

Auto-publish

The build Github Action is automatically triggered by Dependabot, merged by Mergify and then published by the same Github Action.

Credits

Originally forked from Umkus/lambda-layer-sharp.

About

An AWS Lambda Layer for the Sharp node module. Automatically published on updates.

Topics

Resources

Stars

Watchers

Forks

Languages

  • JavaScript 77.3%
  • Dockerfile 22.7%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy