Serverless FastAPI Security: Unlocked Doors Invite Unwanted Guests

Serverless FastAPI Security: Unlocked Doors Invite Unwanted Guests

In part 1 and part 2 of our Serverless FastAPI series, we covered the development and testing aspects of our FastAPI app. Now we’ll shift our attention to security.

Security shouldn’t be an afterthought, however, the theme of this series has been to get you up and running in a manner that is beginner-friendly, whilst also exposing you to shortcomings and approaches in an organic way.

Read more
Serverless FastAPI Testing: Use Moto and Just Mock It!

Serverless FastAPI Testing: Use Moto and Just Mock It!

In my previous blog post Serverless FastAPI Development: Building Player FC API on AWS, we explored creating and deploying a FastAPI application on AWS. In this blog post we’ll take a look at testing our app locally.

We write tests to prove that our code works as designed, however since our code interacts with cloud services it’s somewhat of a challenge to mock tests to the cloud without actually making api calls that traverse the internet, well that is unless you use Moto.

Moto is a Python library that mocks AWS services, allowing you to test without making real API calls.

Read more
Serverless FastAPI Development: Building Player FC API on AWS

Serverless FastAPI Development: Building Player FC API on AWS

It’s been a while since I’ve had the opportunity to build something simple, interesting and modern. Towards the backend of 2024 I stumbled across FastAPI and got excited, whilst I’ve built internal APIs at work before, I hadn’t yet created anything public facing.

Hello FastAPI!

FastAPI is a modern, powerful framework for building APIs with Python and it seemed perfect for what I wanted to build, an API for basic football player info. I initially dubbed it “Jugador FC” before settling for “Player FC API”.

“Some say ‘No player is bigger than the club.’ Let’s be real, modern day fans care more about players than the actual team most of the time.”

In this blog post I’ll walk you through how I built it, from local development all the way to deploying it on AWS.

Read more