-
-
Save AlbaHoo/89e70d21283a45670f31fd853b48f102 to your computer and use it in GitHub Desktop.
ImageMagick Static Binaries for AWS Lambda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime | |
# As of Nov 23, 2015, this is Amazon Linux AMI 2014.09.2 x86_64 (ami-0c682c64) | |
# | |
# Lambda includes ImageMagick 6.7.8-9 preinstalled, so you need to prepend PATH | |
# with the folder containing these binaries in your Lambda function to ensure | |
# these newer binaries are used. | |
sudo yum -y install libpng-devel libjpeg-devel libtiff-devel gcc | |
curl -O http://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar zxvf ImageMagick.tar.gz | |
cd ImageMagick | |
./configure --prefix=/var/task/imagemagick --enable-shared=no --enable-static=yes | |
make | |
sudo make install | |
tar zcvf ~/imagemagick.tgz /var/task/imagemagick/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment