FastAPI

Porter deploys your application to a cloud provider of your choice in a few clicks, whether that is AWS, Google Cloud, or Azure. Just push your code to a Git repository and let Porter handle the rest from CI/CD to autoscaling.

This guide will walk you through the steps of deploying a FastAPI app on AWS, Google Cloud, or Azure via Porter.

Below is a boilerplate FastAPI application we will use as an example.

Example Application

You can fork this repository to get started.

How to Deploy

Create an account on Porter

Porter deploys your applications to your own AWS, GCP, or Azure account. To deploy a FastAPI application, you must first connect your cloud account to Porter.

First, create an account on Porter. Follow this guide to connect your AWS, GCP, or Azure account. Porter will create the necessary infrastructure in the cloud provider of your choice.

Deploying from the dashboard

Once you’ve connected your AWS account, you can start deploying your FastAPI application. Take a look here for a more detailed guide.

  1. Create a New Application on Porter.
  2. Select the Git repository you would like to deploy.
  3. Click Deploy.

That’s it! Porter will automatically build and deploy your application.

You will be able to see the example FastAPI app deployed on a vanity URL that ends with onporter.run. Verify that the application has been deployed by going to the /docs page on your application, which will show the auto-generated docs as below:

FastAPI