Skip to content

andreasgrimm/ghostscript-lambda-layer

 
 

Repository files navigation

Ghostscript for AWS Lambda as a Layer

Getting Started

Click on Layers and choose "Add a layer", and "Provide a layer version ARN" and enter the following ARN.

arn:aws:lambda:us-east-1:764866452798:layer:ghostscript:8

Works with the following AWS Lambda runtimes which run on Amazon Linux 2:

  • nodejs14.x, nodejs12.x
  • nodejs10.x
  • python3.8
  • java11

Version ARNs

Ghostscript v9.52

AWS Region Layer ARN (brotli)
us-east-1 arn:aws:lambda:us-east-1:764866452798:layer:ghostscript:8
us-east-2 arn:aws:lambda:us-east-2:764866452798:layer:ghostscript:8
us-west-1 arn:aws:lambda:us-west-1:764866452798:layer:ghostscript:8
us-west-2 arn:aws:lambda:us-west-2:764866452798:layer:ghostscript:8
ca-central-1 arn:aws:lambda:ca-central-1:764866452798:layer:ghostscript:8
sa-east-1 arn:aws:lambda:sa-east-1:764866452798:layer:ghostscript:8
eu-north-1 arn:aws:lambda:eu-north-1:764866452798:layer:ghostscript:8
eu-central-1 arn:aws:lambda:eu-central-1:764866452798:layer:ghostscript:8
eu-west-1 arn:aws:lambda:eu-west-1:764866452798:layer:ghostscript:8
eu-west-2 arn:aws:lambda:eu-west-2:764866452798:layer:ghostscript:8
eu-west-3 arn:aws:lambda:eu-west-3:764866452798:layer:ghostscript:9
ap-northeast-1 arn:aws:lambda:ap-northeast-1:764866452798:layer:ghostscript:8
ap-northeast-2 arn:aws:lambda:ap-northeast-2:764866452798:layer:ghostscript:8
ap-south-1 arn:aws:lambda:ap-south-1:764866452798:layer:ghostscript:8
ap-southeast-1 arn:aws:lambda:ap-southeast-1:764866452798:layer:ghostscript:8
ap-southeast-2 arn:aws:lambda:ap-southeast-2:764866452798:layer:ghostscript:8

Ghostscript v9.50

AWS Region Layer ARN (brotli)
us-east-1 arn:aws:lambda:us-east-1:764866452798:layer:ghostscript:6
us-east-2 arn:aws:lambda:us-east-2:764866452798:layer:ghostscript:6
us-west-1 arn:aws:lambda:us-west-1:764866452798:layer:ghostscript:6
us-west-2 arn:aws:lambda:us-west-2:764866452798:layer:ghostscript:6
ca-central-1 arn:aws:lambda:ca-central-1:764866452798:layer:ghostscript:6
sa-east-1 arn:aws:lambda:sa-east-1:764866452798:layer:ghostscript:6
eu-north-1 arn:aws:lambda:eu-north-1:764866452798:layer:ghostscript:6
eu-central-1 arn:aws:lambda:eu-central-1:764866452798:layer:ghostscript:6
eu-west-1 arn:aws:lambda:eu-west-1:764866452798:layer:ghostscript:6
eu-west-2 arn:aws:lambda:eu-west-2:764866452798:layer:ghostscript:6
eu-west-3 arn:aws:lambda:eu-west-3:764866452798:layer:ghostscript:7
ap-northeast-1 arn:aws:lambda:ap-northeast-1:764866452798:layer:ghostscript:6
ap-northeast-2 arn:aws:lambda:ap-northeast-2:764866452798:layer:ghostscript:6
ap-south-1 arn:aws:lambda:ap-south-1:764866452798:layer:ghostscript:6
ap-southeast-1 arn:aws:lambda:ap-southeast-1:764866452798:layer:ghostscript:6
ap-southeast-2 arn:aws:lambda:ap-southeast-2:764866452798:layer:ghostscript:6

Ghostscript v9.20

AWS Region Layer ARN (brotli)
us-east-1 arn:aws:lambda:us-east-1:764866452798:layer:ghostscript:1
us-east-2 arn:aws:lambda:us-east-2:764866452798:layer:ghostscript:1
us-west-1 arn:aws:lambda:us-west-1:764866452798:layer:ghostscript:1
us-west-2 arn:aws:lambda:us-west-2:764866452798:layer:ghostscript:1
ca-central-1 arn:aws:lambda:ca-central-1:764866452798:layer:ghostscript:1
sa-east-1 arn:aws:lambda:sa-east-1:764866452798:layer:ghostscript:1
eu-north-1 arn:aws:lambda:eu-north-1:764866452798:layer:ghostscript:1
eu-central-1 arn:aws:lambda:eu-central-1:764866452798:layer:ghostscript:1
eu-west-1 arn:aws:lambda:eu-west-1:764866452798:layer:ghostscript:1
eu-west-2 arn:aws:lambda:eu-west-2:764866452798:layer:ghostscript:1
eu-west-3 arn:aws:lambda:eu-west-3:764866452798:layer:ghostscript:1
ap-northeast-1 arn:aws:lambda:ap-northeast-1:764866452798:layer:ghostscript:1
ap-northeast-2 arn:aws:lambda:ap-northeast-2:764866452798:layer:ghostscript:1
ap-south-1 arn:aws:lambda:ap-south-1:764866452798:layer:ghostscript:1
ap-southeast-1 arn:aws:lambda:ap-southeast-1:764866452798:layer:ghostscript:1
ap-southeast-2 arn:aws:lambda:ap-southeast-2:764866452798:layer:ghostscript:1

Where can I find the Ghostscript binary inside of Lambda after I attach the layer?

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.

Update

  1. Change version number & git tag in the Dockerfile
  2. Run ./build.sh script which will produce ghostscript.zip file
  3. Change version number in the publish.sh
  4. Commit & Create a Pull Request
  5. After merging, a new layer version will be published by the CI automatically

License

MIT © Shelf

About

Ghostscript AWS Lambda layer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 61.2%
  • Dockerfile 38.8%