Click on Layers and choose "Add a layer", and "Provide a layer version ARN" and enter the following ARN.
arn:aws:lambda:<YOUR REGION>:764866452798:layer:ghostscript:<VERSION>
arn:aws:lambda:<YOUR REGION>:764866452798:layer:ghostscript-arm64:<VERSION>
Note: ARM64 provides better price-performance ratio for Lambda functions. Consider using ARM64 for new projects.
Works with the following AWS Lambda runtimes which run on Amazon Linux 2:
- nodejs20.x, nodejs18.x, nodejs16.x
- python3.12, python3.11, python3.10, python3.9, python3.8
- java21, java17, java11
- provided.al2, provided.al2023
| Ghostscript | x86_64 VERSION | ARM64 VERSION | eu-west-3 x86_64 | eu-west-3 ARM64 |
|---|---|---|---|---|
| v10.06.0 | TBD | TBD | TBD | TBD |
| v10.04.0 | 17 | - | 18 | - |
| v10.02.0 | 15 | - | 16 | - |
| v10.0.0 | 13 | - | 14 | - |
| v9.56.1 | 12 | - | 13 | - |
| v9.55.0 | 9 | - | 10 | - |
| v9.52.0 | 8 | - | 9 | - |
| v9.50.0 | 6 | - | 7 | - |
| v9.20.0 | 1 | - | 1 | - |
You can find it at /opt/bin/gs (/opt is where Lambda unpacks layers).
You can run /opt/bin/gs --version to make sure Ghostscript is up and running.
- Docker with multi-platform support (Docker Desktop includes buildx by default)
- For ARM64 builds: Docker buildx must be enabled
Run the build script to create both architecture variants:
./build.shThis will produce:
ghostscript-x86_64.zip- x86_64 architectureghostscript-arm64.zip- ARM64 architecture
To publish layers manually (requires AWS credentials and proper permissions):
export TARGET_REGION="us-east-1"
export BASE_DIR="$(pwd)" # Optional: defaults to current directory
./publish.sh- Change version numbers in the
version.shfile (GHOSTSCRIPT_VERSION and GS_TAG) - Test locally by running
./build.shto produce both zip files - Verify the builds:
unzip -l ghostscript-x86_64.zipandunzip -l ghostscript-arm64.zip - Publish the new layers using
./publish.sh(set TARGET_REGION and BASE_DIR as needed) - Update the version table in this README with the new layer version numbers
MIT © Shelf