An AWS Lambda Layer containing MuPDF CLI tools (mutool and muraster) built for Amazon Linux 2023.
This project provides a Lambda Layer that packages MuPDF command-line tools, making them available for use in AWS Lambda functions. The layer is built using Amazon Linux 2023 to ensure compatibility with Lambda's runtime environment.
Current MuPDF version: 1.24.10
The layer includes:
bin/mutool
- An all purpose tool for dealing with PDF filesbin/muraster
- Can be used to convert PDF pages to raster imageslib/*
- All required shared libraries
- Download the layer ZIP from the latest release
- Create a new Lambda Layer in your AWS account
- Upload the ZIP file
- Attach the layer to your Lambda function
The layer is automatically published to AWS Lambda's layer registry on each release. You can fork this repository and add the following repository secrets to enable automated deployments:
AWS_ACCESS_KEY_ID
: Your AWS access key IDAWS_SECRET_ACCESS_KEY
: Your AWS secret access keyAWS_REGION
: The AWS region to deploy toS3_BUCKET
: The S3 bucket name for storing the layer ZIP file
The layer is automatically built using GitHub Actions. The workflow:
- Sets up an Amazon Linux 2023 container
- Builds MuPDF from source
- Packages the binaries and dependencies
- Creates a ZIP file
- Publishes to S3 and Lambda Layer registry (on release only)
To build locally, you can follow the steps in the GitHub Actions workflow file.
This project is provided under the same license as MuPDF. See MuPDF's license for details.
Contributions are welcome! Please feel free to submit a Pull Request.