Skip to content

Umkus/lambda-layer-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Sharp layer

This AWS lambda layer contains a latest pre-built vanilla sharp npm library, so that you could "just use" it in your lambda code:

import sharp from 'sharp'
// ...

It contains only necessary files to minimize its weight (16Mb). It also supports all current AWS lambda node runtimes (>=nodejs14.x) and architectures (x86_64 and arm64).

Getting

A pre-built layer zip file is available on the Releases page.

You can import it into your AWS account throught the Lambda console or with the following command:

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 nodejs14.x nodejs16.x nodejs18.x nodejs20.x \
    --compatible-architectures x86_64 arm64

Building

Simply run (this will wipe your existing node_modules/ directory):

npm ci --arch=x64 --platform=linux

Build will be performed automatically upon deps installation. The resulted lambda layer zip file will be saved to dist/ directory.

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
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