Skip to main content

Command Palette

Search for a command to run...

From Zero to AWS: Deploying a Full-Stack Next.js App the Right Way

Updated
4 min read
From Zero to AWS: Deploying a Full-Stack Next.js App the Right Way
N

As a Senior Full-Stack Software Engineer with over 9 years of experience, I specialize in designing and delivering robust, scalable, and efficient software solutions. My expertise spans the full software development lifecycle—from requirements analysis and architecture to implementation, optimization, and maintenance. With a strong foundation in C#, .NET Core, Angular, and SQL, I excel at building high-performance applications that drive business growth. My technical background also includes JavaScript, CSS, Entity Framework, SQL Server, and Azure, enabling me to develop end-to-end solutions that seamlessly integrate with enterprise systems. I am passionate about problem-solving, continuous improvement, and user-centric design. I thrive on translating complex business needs into intuitive and reliable applications. Collaboration is central to my work ethic; I enjoy partnering with cross-functional teams to innovate, optimize workflows, and achieve measurable results. Whether it’s streamlining backend processes, developing dynamic web applications, or integrating cloud and third-party services, I bring a detail-oriented, results-driven mindset to every project. My goal is to contribute to impactful initiatives that not only meet expectations but consistently exceed them.

I have been writing software professionally for years. I know how to build things. But there was always a gap between what I built and what actually ran in production - a gap usually filled by a DevOps engineer or a cloud team. This is the story of closing that gap myself.

Why a simple CRUD app?

The most common mistake developers make when learning something new is choosing a project that is too complex. The infrastructure becomes confusing because the application is confusing. I wanted to isolate the variables - so I built the simplest meaningful app I could think of: an Employee Management System with basic Create, Read, Update and Delete operations.

The app itself is not the point. What is remarkable is the journey of getting it from a local development environment all the way to a live URL on AWS, with a pipeline that deploys automatically on every code push.

The full technology stack

The seven stages of the journey

The CI/CD pipeline

This is the part I am most proud of. Every single code change goes through this flow automatically:

git push → GitHub Actions triggers → docker build → push to ECR → ECS deploys →

Live in ~2 min

The GitHub Actions workflow file is just a YAML file in the repository. It logs into AWS using secrets stored in GitHub, builds the Docker image, pushes it to ECR, then calls the AWS CLI to force a new ECS deployment. No manual steps. No SSH. No servers to touch.

# .github/workflows/deploy.yml on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - name: Configure AWS credentials - name: Login to ECR - name: Build and push Docker image - name: Deploy to ECS run: aws ecs update-service --force-new-deployment

What the AWS architecture looks like

The production setup uses several AWS services working together. The Docker image lives in ECR. The container runs on ECS Fargate — no EC2 instances to manage, completely serverless. The database lives in RDS PostgreSQL — managed, backed up, and connected to the container via a secure connection string stored as an environment variable in the ECS task definition. Everything sits inside a VPC with security groups controlling exactly which ports are open.

The honest challenges

I want to be straightforward about what was actually hard. Not the code — the code was straightforward. The challenges were entirely in the infrastructure:

"The gap between 'it works on my machine' and 'it works in production' is where all the real engineering happens."

What I would do differently

Looking at the finished project, there are several things I would add if this were a real production system. A proper Application Load Balancer would give a stable permanent URL instead of a changing IP on every deployment. HTTPS via ACM and a custom domain from Route 53 would make it production-ready. SonarQube or SonarCloud integration in the pipeline would add code quality gates similar to what enterprise teams use. A staging environment before production would add a safety net.

The takeaway for other developers

If you are a developer who understands application code but has always handed deployment to someone else — this is the project to build. Not because an Employee Management System is interesting, but because deploying it properly forces you to confront every layer of the stack.

You will learn what a VPC actually is when you have to configure one. You will understand what IAM roles do when something breaks because a role is missing a permission. You will understand Docker not as a concept but as a tool you depend on. You will feel the satisfaction of watching a git push trigger a pipeline that puts your code on a real server, in real infrastructure, accessible from anywhere in the world.

The stack I used — Next.js, Prisma, PostgreSQL, Docker, AWS, GitHub Actions — is not a toy stack. It is what real production systems are built on. The app was simple. The learning was not.

#AWS#NextJS#Docker#DevOps#Prisma#PostgreSQL#GitHubActions#CloudDeployment#LearningInPublic#SoftwareEngineering