A simple demo using tesseract.js OCR wiht AWS lambda Function.
- Node.js
node --version
v14.17.0
- npm
npm --version
8.10.0
- Serverless framework
serverless --version
Framework Core: 3.19.0
Plugin: 6.2.2
SDK: 4.3.2
- AWS cli
aws --version
aws-cli/2.4.2
- AWS Credentias configured
-
Run
npm init
for start the npm project and install packages over the original template -
Change the name of services in serverless.yml
service: serverless-aws-ocr-tesseract-demo
-
Add the code of tesseract sample using the official documentations:
-
Add more time out value and more memory to lambda
memorySize: 3008
timeout: 500
- Download this repository
# by ssh for example
git clone [email protected]:olcortesb/serverless-aws-ocr-tesseract-demo.git
- Deploy the lambda
sls deploy --aws-profile nombre-de-nuestro-profile --stage dev
- Call lambda function
serverless invoke --function hello --aws-profile name-you-profile
- Remove Stack
serverless remove --stage dev
This repo is base on template: https://github.com/olcortesb/serverless-aws-nodejs-template