Created
August 12, 2019 05:56
-
-
Save hughevans/6b8c57839b8194ba910428de4375794a to your computer and use it in GitHub Desktop.
exiftool Lambda layer Node 8.10
This file contains hidden or 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
#!/bin/sh | |
export EXIFTOOL_VERSION=11.61 | |
export PERL_VERSION="5-30" | |
rm -rf layer | |
curl -sS https://shogo82148-lambda-perl-runtime-ap-southeast-2.s3.amazonaws.com/perl-${PERL_VERSION}-runtime.zip > perl.zip | |
mkdir layer | |
cd layer | |
unzip ../perl.zip | |
cd .. | |
rm perl.zip | |
curl https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz | tar -xJ | |
mkdir -p layer/bin | |
cp Image-ExifTool-${EXIFTOOL_VERSION}/exiftool layer/bin/. | |
sed -i "" "1 s/^.*$/#\!\/opt\/bin\/perl -w/" layer/bin/exiftool | |
cp -r Image-ExifTool-${EXIFTOOL_VERSION}/lib layer/bin/. | |
rm -rf Image-ExifTool-${EXIFTOOL_VERSION} | |
cd layer | |
zip -r layer.zip ./* | |
cd .. | |
mv layer/layer.zip . | |
rm -rf layer |
It will generate a zip file and we will upload that file on aws lambda layer but now if we have a java code in lambda the how to use this tool in our code?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is it possible to have an example of usage of the exiftool layer with a lambda ?