Serverless classifier trained with AWS Sagemaker and deployed on AWS Lambda
See blog post: https://medium.com/@pvhee/building-a-serverless-not-hotdog-classifier-with-aws-sagemaker-and-lambda-dd473cf6506a
Check out the Jupyter notebook for model training using fast.ai and make sure to save your model to AWS S3.
We use the serverless framework to get our model inference on AWS Lambda.
serverless deploy
...
endpoints:
POST - https://ax45wn5lv2.execute-api.us-east-1.amazonaws.com/dev/invoke
Example inference on this hotdog.
curl -d "{\"url\":\"https://leitesculinaria.com/wp-content/uploads/fly-images/96169/best-hot-dog-recipe-fi-400x300-c.jpg\"}" -H "Content-Type: application/json" -X POST https://ax45wn5lv2.execute-api.us-east-1.amazonaws.com/dev/invoke
We use artillery.io to load test our model inference.
cd loadtest/
artillery run artillery.yml