Skip to content

Create a serverless API using FastAPI, deployed on AWS App Runner and powered by Neon Postgres

Notifications You must be signed in to change notification settings

neondatabase/fastapi-apprunner-neon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI App with Neon Serverless Postgres and AWS App Runner

This repository is a companion to a FastAPI and AWS App Runner with Neon post on the Neon blog.

This repository hosts a FastAPI application leveraging Neon Serverless Postgres, deployed via AWS App Runner. This setup offers a solution for developing and deploying Python applications with demands for performance and reliability.

Features

  • FastAPI: A modern, fast (high-performance) web framework for building APIs with Python 3.11, featuring automatic Swagger UI generation, type checking, and asynchronous request handling.
  • Neon Serverless Postgres: A scalable, fully managed serverless Postgres database, minimizing operational overhead.
  • AWS App Runner: An AWS service that provides a simple, fully managed environment for deploying containerized-type applications, eliminating the need for infrastructure configuration and management.

Prerequisites

Getting Started

1. Clone the Repository

Clone the repository to your local machine and navigate into the project directory:

git clone https://github.com/neondatabase/fastapi-apprunner-neon
cd fastapi-apprunner-neon

2. Setup Your Python Environment with Poetry

Initialize a new environment using Poetry and install the project dependencies:

poetry install

3. Neon Serverless Postgres

  • Sign up or log in to your Neon account
  • You'll need this the database connection string for configuration.

4. Deploy to AWS App Runner

Follow along in the blog post to configure AWS SSM Parameter Store and deploy the FastAPI to AWS App Runner.

About

Create a serverless API using FastAPI, deployed on AWS App Runner and powered by Neon Postgres

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages