- Notifications
You must be signed in to change notification settings - Fork0
MichaelWalker-git/lambda-layer-sharp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This AWS lambda layer contains a latest pre-built vanillasharp npm library, so that you could "just use" it in your lambda code:
importsharpfrom'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
andarm64
).
A pre-built layer zip file is available on theReleases 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 \ --compatible-architectures x86_64 arm64
Simply run (this will wipe your existingnode_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 todist/
directory.
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
Languages
- JavaScript100.0%