Search code examples
pythonlambdatesseract

How to deploy tesseract zipped file with lambda function to aws lambda


I found this ( Tesseract OCR on AWS Lambda via virtualenv) great step by step procedure on how to build tesseract and deploy to aws lambda. But I could not progress on step 7. No idea what the author meant by adding the lambda function to root of the zipped file. Could any one e help @José Augusto Paiva


Solution

  • The root directory is the base directory. In the case of the zip file, he specifies this because most times people just right click on a folder and click Compress "tesseract-lambda". The problem with this is that this file that needs to be in the root isn't if it's inside that folder. Here's what you need to do.

    Select both the file that is your lambda function, and the folder that contains your code, in the example you linked, that folder is called tesseract-lambda. Then right click and select Compress 2 Items

    Screenshot of Compressing Files

    Note: If you just click to unzip, it'll appear that your files are all inside a folder called Archive, if you want to verify you zipped it correctly, run this command from Terminal:

    unzip Archive.zip