ImageMagick not converting pdfs anymore in AWS Lambda

后端 未结 4 1456
没有蜡笔的小新
没有蜡笔的小新 2021-02-07 15:41

I\'ve had a AWS Lambda function running on S3 objects for the last 18 months and it died around a month ago after a minor update. I\'ve reverted it but it\'s still broken. I\'ve

4条回答
  •  旧时难觅i
    2021-02-07 15:57

    I had the issue where ghostscript was no longer found.

    Previously, I had referenced ghostscript via:

    var gs = '/usr/bin/gs';
    

    Since AWS lambda stopped providing that package, I went and included it directly into my lambda function which worked for me. I just downloaded the files from https://github.com/sina-masnadi/lambda-ghostscript and placed it in a folder called 'ghostscript' Then referenced it as so:

    var path = require('path')
    var gs = path.join(__dirname,"ghostscript","bin","gs")
    

提交回复
热议问题