/images/avatar-new.png

IT Guy Journals

Building a Portable FastAPI Backend for AWS Lambda and ECS Using Terraform

In the previous post, we explored how to deploy a FastAPI application on AWS Lambda using an ASGI adapter. This is a great option for early-stage projects: it requires zero infrastructure management, supports rapid iteration, and scales automatically.

But as your application matures, Lambda’s trade-offs can become limiting:

  • Cost scaling with consistent traffic
  • Compute/memory coupling and lack of vertical scaling
  • Package size limits and cold starts

That’s why many teams adopt a container-based workflow that can run on both Lambda (via container images) and ECS Fargate. With a little planning, you can build once and deploy to either platform with minimal friction.

Setting Up a Synology NAS for Your Homelab: The Complete Guide

When building or expanding a homelab, setting up a Synology NAS is one of several strong options for managing local storage, backups, and remote access. It’s a flexible platform that offers many features typically found in enterprise storage solutions, but in a form factor and price point that’s accessible to home users.

If you’re considering moving more of your important files, services, or backups off of third-party cloud providers and into a system you control, a NAS can be a great fit. (You can read more about why I personally chose Synology here.

Cloud Storage Is Getting Expensive — Here’s Why I Switched to Synology NAS

These days, everything lives in the cloud — photos, videos, documents, backups. And for a while, it felt like cloud storage was the perfect solution: easy to access, always backed up, and simple to share with others.

But if you’re like me and deal with a lot of files — especially big ones like videos or high-res photos — you’ve probably hit the same wall I did: cloud storage gets really expensive, really fast.

Building Backend APIs with FastAPI on AWS Lambda

One of the trade-offs of working in the cloud is the risk of vendor lock-in. While cloud platforms offer powerful tools and scalability, they can also tie you into their ecosystem, making it harder to pivot or migrate down the road.

When it comes to building backend APIs in Python, you have a few great frameworks at your disposal—Django, FastAPI, and Flask—each with its own level of complexity and opinionation. Django is feature-rich and great for full-stack apps, Flask is minimal and flexible, but FastAPI stands out as a modern, async-first framework that makes it incredibly easy to build fast, clean, and production-ready APIs.

Building Websites at Scale With Aws CloudFront and Hugo

Building websites has become easier than ever. Numerous platforms and third-party providers now offer tools to create and host websites within minutes, complete with custom domains, analytics, and sleek graphical interfaces.

For straightforward websites or smaller-scale projects, these platforms can be a convenient choice. However, they often fall short when it comes to flexibility, automation, and cost-effectiveness at scale. Many lack robust CLI (Command Line Interface) support for streamlining tasks, can become expensive as your needs grow, or demand significant management effort and a steep learning curve.

Organizing Terraform Projects With Terragrunt

Infrastructure-as-Code (IaC) tools, like Terraform, have become essential for managing infrastructure in a scalable, repeatable, and automated way. Terraform helps engineers define, provision, and manage cloud resources across multiple providers. However, as infrastructure complexity grows, managing Terraform configurations becomes challenging. This is where Terragrunt—a thin wrapper for Terraform—comes into play. It enhances Terraform’s capabilities, making it easier to manage large-scale infrastructures efficiently.

In this blog, we will explore how to organize Terraform projects using Terragrunt, and how it solves common challenges with Terraform’s limitations such as managing backend configurations, large state files, and dependencies between multiple stacks.