RWMostert / pdf-to-image-lambda

A Chalice-based AWS Lambda function to convert a PDF document in a source S3 bucket to an image.
15 stars 8 forks source link

Is poppler installed and in PATH? #2

Open juanzapa opened 4 years ago

juanzapa commented 4 years ago

Hi there, I have done all the steps but when I enter a pdf to the bucket and the lambda function is activated it does not work, investigating the logs the following error appears.

image

jimjeffers commented 3 years ago

@juanzapa I got around this by installing the lambda layer from this repo: https://github.com/jeylabs/aws-lambda-poppler-layer

  1. I followed the directions on the README for the poplar layer - download the latest zip from releases and manually upload the layer to the AWS layers console.
  2. Add the ARN of the new layer to {..."layers": [<ARN>], ...} to the .chalice/config.json
  3. Remove the poppler_path='...' from this line https://github.com/RWMostert/pdf-to-image-lambda/blob/master/app.py#L78

pdf2image should now be able to find popper via the lambda layer.