Deployment could be easy — A Data Scientist’s Guide to deploy an Image detection FastAPI API using Amazon ec2
A Full Example
Just recently, I had written a simple tutorial on FastAPI, which was about simplifying and understanding how APIs work, and creating a simple API using the framework.
That post got quite a good response, but the most asked question was how to deploy the FastAPI API on ec2 and how to use images data rather than simple strings, integers, and floats as input to the API.
I scoured the net for this, but all I could find was some undercooked documentation and a lot of different ways people were taking to deploy using NGINX or ECS. None of those seemed particularly great or complete to me.
So, I tried to do this myself using some help from FastAPI documentation . In this post, we will look at predominantly four things:
Setting Up an Amazon Instance
Creating a FastAPI API for Object Detection
Deploying FastAPI using Docker
An End to End App with UI
So, without further ado, let’s get started.
You can skip any part you feel you are versed with though I would expect you to go through the whole post, long…
Keep reading with a 7-day free trial
Subscribe to MLWhiz | AI Unwrapped to keep reading this post and get 7 days of free access to the full post archives.