Page 1 of 1

AWS Lambda Error: UnableToOpenConfigureFile `delegates.xml'

Posted: 2019-12-17T12:33:08-07:00
by arg17801
I am using ImageMagick v3 as a layer for a Lambda Function in Golang, using the https://github.com/gographics/imagick library. I've compiled ImageMagick 7.0.9-8 from source inside an EC2 t3 micro instance running Amazon Linux, and zipped the binaries, shared, etc, and libs to deploy my layer. However, it throws this error:

Code: Select all

WARNING_CONFIGURE: UnableToOpenConfigureFile `delegates.xml' @ warning/configure.c/GetConfigureOptions/699
I have tried the following:
  • Add the directories /opt/Imagick/bin and /opt/Imagick/lib to the environment.
  • Check if the directories /opt/Imagick/bin, /opt/Imagick/etc/ImageMagick-7/delegates.xml, and /opt/Imagick/share/ImageMagick-7/delegates.xml exist with

    Code: Select all

    os.Stat
    and

    Code: Select all

    os.IsNotExist
    , which haven't printed any error.
  • Do prints after every if in this code https://golangcode.com/convert-pdf-to-jpg/ to check where it is failing
We noticed the happens right after invoking imagick.NewMagickWand, and have no idea how to move on from this problem