Skip to content

Using Serverless to consume and processing WA Animals adoption forms using Amazon Textract and placing that data in DynamoDB

Notifications You must be signed in to change notification settings

t04glovern/aws-textract-adoption-forms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Textract Adoption Form - WA Animals

Consuming and processing WA Animals adoption forms using AWS Textract and placing that data in DynamoDB

Architecture

Serverless Setup

## Project Setup
mkdir form-process
cd form-process

npm install -g serverless
serverless create --template aws-python3 --name form-process

Requirements [Workaround]

Currently the boto3 client deployed to Lambda doesn't include textract. We'll need to force an update on the client using python requirements

serverless plugin install -n serverless-python-requirements
npm install

Create a requirements.txt file and add the following to it

boto3>=1.9.111

Also in the next section take careful note of the lines below

pythonRequirements:
  dockerizePip: non-linux
  noDeploy: []

noDeploy tells the serverless-python-requirements plugin to include boto3 and not omit it. More information can be found HERE

Running

# Install dependencies
cd form-process
npm install

# Install serverless (if you haven't already)
npm install -g serverless

# Deploy
serverless deploy

Testing (Textract)

To test just the Textract portion of the app, run the following to copy it to your S3 bucket.

aws s3 cp ../docs/adoption-agreement.png s3://waanimalsadoptionforms

Attribution

Releases

No releases published

Packages

No packages published

Languages