Member-only story

Making Sense of Big Data

FastAPI + AWS = robust API (Part 1)

Let’s build a scalable serverless Python-based REST API with FastAPI, AWS Lambda, and API Gateway

Anna Geller
Towards Data Science
10 min readNov 11, 2020

--

Background photo by Spencer Selover from Pexels — Edited by author

FastAPI revolutionized the way of developing modern Python-based REST APIs. Since its inception, the project has been adopted by large companies, such as Microsoft, Uber, and Netflix, and it’s increasingly gaining popularity, what we can observe by the number of Github stars growing every day.

Being able to build fast, robust, secure, and scalable APIs is a must-have skill for any backend (data) engineer. In this article, we’ll build a simple REST API that will show the market sentiment and current prices of selected cryptocurrencies in a currency of your choice (euro, dollar, etc.).

We’ll use the top-down approach: from packaging and deploying the API to diving into details on what it is about. In Part 1, we’ll deploy our FastAPI code to AWS by leveraging Amazon Lambda and API Gateway. In the future article (Part 2), we’ll make sure to secure our API by using API keys. We’ll also demonstrate how to enable distributed tracing and logging to track our application’s health. Let’s dive in!

Table of contents:

  1. Create a Pycharm project with a virtual…

--

--

Towards Data Science
Towards Data Science

Published in Towards Data Science

Your home for data science and AI. The world’s leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals.

Anna Geller
Anna Geller

Written by Anna Geller

Data Engineering, AWS Cloud, Serverless & .py. Get my articles via email https://annageller.medium.com/subscribe YouTube: https://www.youtube.com/@anna__geller

Responses (12)