Member-only story
Deploy Fast API on GCP Compute Engine VM Instance
Run your Fast API on GCP VM Instance and make a postman request to test if it’s running and publicly available
Welcome to our comprehensive guide on deploying FastAPI applications on Google Cloud Platform (GCP) Compute Engine VM instances! FastAPI is a modern, high-performance web framework for building APIs with Python, and GCP offers a reliable and scalable infrastructure for running your applications.
In this tutorial, we’ll walk you through the process of setting up a GCP VM instance, configuring the necessary firewall rules, and deploying a sample FastAPI application. By the end of this guide, you’ll have a fully functional FastAPI application running on a GCP VM instance, accessible via a public IP address, and ready to be tested using Postman or any other API client.
Table of contents
· A sample Fast API Example
· Create a GCP Compute Engine VM Instance
∘ Step 1: Go to https://console.cloud.google.com/compute/instances
∘ Step 2: Click on VM Instances -> CREATE INSTANCE
∘ Step 3: Scroll down and click on Advanced options -> Networking
· Create VPC firewall rule
∘ Step 1: Go https://console.cloud.google.com/networking/firewalls/
∘ Step 2: Click on CREATE FIREWALL RULE
∘ Step 3: Scroll and…

