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.
- 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.
- Python 3.11
- AWS Account
- A Neon account for Serverless Postgres
- Git
- Poetry for Python dependency management
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
Initialize a new environment using Poetry and install the project dependencies:
poetry install
- Sign up or log in to your Neon account
- You'll need this the database connection string for configuration.
Follow along in the blog post to configure AWS SSM Parameter Store and deploy the FastAPI to AWS App Runner.