Skip to content

Instantly share code, notes, and snippets.

@hughevans
Created August 12, 2019 05:56
Show Gist options
  • Save hughevans/6b8c57839b8194ba910428de4375794a to your computer and use it in GitHub Desktop.
Save hughevans/6b8c57839b8194ba910428de4375794a to your computer and use it in GitHub Desktop.
exiftool Lambda layer Node 8.10
#!/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
@patforna
Copy link

Link to ExifTool tar seems to be broken. Here's the new one that works:

https://exiftool.org/Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz

Also, EXIFTOOL_VERSION can be bumped to 11.84.

@feldmanz66
Copy link

This was a huge help in getting exiftool to work on node.js lambda. Thank you for putting it together!

@gborasio
Copy link

gborasio commented May 3, 2022

is it possible to have an example of usage of the exiftool layer with a lambda ?

@dilipdhankecha2530
Copy link

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