Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Due to potential license concerns for the HEVC patent group, this repo can't be

But you can compile and deploy this lambda layer yourself at your own risk and use it wihin your own accounts. All you need is an S3 bucket to deploy the compiled code to (replace `your-s3-bucket` in the code snippet below). Please see the note below regarding the build process.

It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below.
It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below. The base image that should be used is `aws/codebuild/amazonlinux2-x86_64-standard:4.0`.

```bash
npm run build
Expand Down Expand Up @@ -68,10 +68,12 @@ The following table lists the release version of this repo together with the ver
| 1.1.0 | 0.27.0 | 8.10.5 | 1.10.0 | 1.1.0 | 1.0.8 | 12 |
| 1.2.0 | 0.28.2 | 8.10.6 | 1.12.0 | 1.2.0 | 1.0.8 | 12 |
| 2.0.0 | 0.29.1 | 8.11.3 | 1.12.0 | 1.2.1 | 1.0.8 | 14 |
| 3.0.0 | 0.30.7 | 8.12.2 | 1.12.0 | 1.2.4 | 1.0.8 | 16 |

### CompatibleRuntimes
- `nodejs12.x` (v1.x)
- `nodejs14.x` (v2.x)
- `nodejs16.x` (v3.x)


## Contributions
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
phases:
install:
runtime-versions:
nodejs: 14
nodejs: 16
commands:
- pip3 install aws-sam-cli --upgrade --user
pre_build:
Expand Down
2 changes: 1 addition & 1 deletion examples/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"author": "Andreas Zoellner",
"license": "MIT",
"engines": {
"node": ">=14.0"
"node": ">=16.0"
}
}
8 changes: 4 additions & 4 deletions layer/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Library Versions
WEBP_VERSION=1.2.1
WEBP_VERSION=1.2.4
LIBDE265_VERSION=1.0.8
LIBHEIF_VERSION=1.12.0
VIPS_VERSION=8.11.3
SHARP_VERSION=0.29.1
VIPS_VERSION=8.12.2
SHARP_VERSION=0.30.7

PREFIX_PATH=/opt

Expand All @@ -16,7 +16,7 @@ build-SharpHEICLayer: libvips
# sharp uses several of the libs we installed or compiled. extract the full list and copy all of those into /opt/lib
# extract list with ldd from sharp.node, manipulate a bit with sed to only get the absolute paths, then copy
LD_LIBRARY_PATH=$(PREFIX_PATH)/lib npm --prefix "$(ARTIFACTS_DIR)/nodejs/" install sharp@$(SHARP_VERSION)
ldd $(ARTIFACTS_DIR)/nodejs/node_modules/sharp/build/Release/sharp-linux-x64.node | sed -nE "s/^[^\/\n]*(\/[^ ]+)(.*)/\1/p" | xargs cp -t $(ARTIFACTS_DIR)/lib
LD_LIBRARY_PATH=$(PREFIX_PATH)/lib ldd $(ARTIFACTS_DIR)/nodejs/node_modules/sharp/build/Release/sharp-linux-x64.node | sed -nE "s/^[^\/\n]*(\/[^ ]+)(.*)/\1/p" | xargs cp -t $(ARTIFACTS_DIR)/lib

libwebp:
curl -L https://github.com/webmproject/libwebp/archive/v$(WEBP_VERSION).tar.gz | tar zx
Expand Down
4 changes: 2 additions & 2 deletions layer/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"license": "MIT",
"devDependencies": {},
"engines": {
"node": ">=14.0"
"node": ">=16.0"
},
"dependencies": {
"sharp": "^0.29.1"
"sharp": "^0.30.7"
}
}
Loading