AWS Lambda not working along with the gm module

前端 未结 5 1271
刺人心
刺人心 2020-12-19 03:23

I am using AWS Lambda to resize my image in s3 bucket into different size variants using node js when an image is put into the s3 bucket.

It was working till yesterd

5条回答
  •  醉酒成梦
    2020-12-19 04:06

    https://alas.aws.amazon.com/ALAS-2016-699.html

    "Note: This update contains an updated /etc/ImageMagick/policy.xml file that disables the EPHEMERAL, HTTPS, HTTP, URL, FTP, MVG, MSL, TEXT, and LABEL coders"

    I changed my call from gm(my_url) to gm(request(my_url)) and things seem to be working again. I.e I send a stream from a request() call to ImageMagick instead of letting ImageMagick try to download the image (which is disabled in ImageMagick's policy.xml, a file I can't modify).

提交回复
热议问题