Deploying Boston House Prediction as an API on AWS
Birds view of step involved in creation of ML model as REST API
-
Created sklearn pipeline for imputation, scaling and OHE involving categorical and numerical attributes
-
Perfomed hyperparameter tuning using gridsearch cv and saved the model as pickle life
-
Loading the saved model in predict.py and performing predictions on incoming test data. This is wrapped with Flask microweb framework for python
-
Used gunicorn to get production ready webserver capabilities
-
Develop dockerfile for the application and build the image
-
Run the image locally to test your application within docker container.
-
On successful run, push the image to your dockerhub account.
-
Setup aws account and develop json file, which specifies the image to be pulled from dockerhub
-
Start Amazon Beanstalk service (which hosts nginx by default) and upload you json file.
-
Amazon will throw the url and use postman to test you REST API.
Inspired from https://towardsdatascience.com/deploy-a-machine-learning-model-as-an-api-on-aws-43e92d08d05b
Happy deploying !!!