amazon web services - AWS Lambda: How to use tools that must be installed first in linux? -
i understand aws lambda runs on application layer of isolated environment.
in many situations, functions need use third-party tools must installed first on linux machine. example, media processing function uses exiftool extract metadata image, install exiftool
first.
now want migrate media processing code aws lambda. question is, how can use tools must install on linux? code written in java, , exiftool
necessary.
everything lambda function executes must included in deployment package upload.
that means if want run java code, can reference other java libraries. (likewise, if want run node.js code, can reference other node libraries.)
regardless of tools use, resulting .zip file must have following structure:
all compiled class files , resource files @ root level.
all required jars run code in /lib directory.
(source)
or can upload .jar file.
exiftool
, on other hand, perl command-line program. suspect on local machine, shell out java code , run it.
you cannot in aws lambda. need find java package extracts exif information (i sure there plenty choose from) , include in deployment package. cannot install software packages on lambda.
Comments
Post a Comment