AWS app: http://wine-ratings.us-east-1.elasticbeanstalk.com/
In this exercise, we will build a fastapi ML application and deploy it with continuous delivery on AWS using AWS using Elastic Beanstalk and Code Pipeline.
To build a ML model, refer the colab notebook under notebooks
folder.
To validate the fastapi application locally,
docker build -t wine .
docker run --rm -it -v $(pwd):/app -p 8000:8000 wine
To deploy the fastapi application on AWS following steps were taken.
-
Create AWS account.
-
Under
Elastic Beanstalk
, create a environment. SelectDocker
underPlatform
section. -
Zip the contents of repo using command below and upload the file to
Application code
section. Creating environment takes fair amount of time.cd 6-fastapi-ml-aws-serverless zip -r -D code.zip .
-
In next step, we will use
Code Pipeline
for continuous delivery using Github event trigger. Create a pipeline that connects the source code to Elastic beanstalk application.