- tasks.py holds the functions for checking images against Rekognition, and the dictionaries defining the possible tasks
- task_assigner.py is the Lambda handler for the
assignTasksLambda function in AWS. It returns a random task ID
and description taken from
tasks.py
. - task_checker.py is the Lambda handler for the checkTaskLambda
function in AWS. It takes an ID, a username (email), and a file
path to a picture/video and calls the appropriate validation
function from
tasks.py
with that data.
AWS Lambda requires a zip file package to upload Python code.
To deploy:
- Create a zip file containing the relevant files from the above section for each function (tasks.py and one of the handlers)
- Use the following AWS CLI command or upload using the web UI:
aws lambda update-function-code --function-name <FUNCTION> --zip-file fileb://<ZIPFILE>
Use Postman for manual testing (API Gateway requires AWS SigV4 signed requests), and Python scripts for automated testing.