
We all love Vercel and Heroku. They are easy. But once your free tier runs out, the pricing curve is vertical.
Suddenly, you are paying $20/month for a "Pro" plan just to keep a simple side project alive.
The truth is, AWS is incredibly cheap—if you know how to navigate it. Most people are scared of AWS because they accidentally spin up a $100 Load Balancer.
Here is the exact architecture I use to host robust, full-stack React/Node apps for roughly $3.50 per month.
The Architecture: Splitting the Stack
The secret to low costs is decoupling. Do not put your frontend and backend on the same server.
1. The Frontend: S3 + CloudFront ($0.00 - $0.50)
Never pay for a server to host static HTML/JS/CSS.
S3 (Simple Storage Service): You upload your React/Vue build folder here. It costs pennies for storage.
CloudFront (CDN): This sits in front of S3. It caches your site globally so it loads instantly in Lagos or London.
Cost: AWS offers 1TB of data transfer out for free every month. For most personal projects, this part of the stack is effectively $0.
2. The Backend: EC2 t4g.nano (~$3.04)
This is the hidden gem of AWS.
Most people use the t2.micro or t3.micro because they are on the "Free Tier." But once the free tier expires, they cost about $8/month.
Instead, switch to t4g.nano.
ARM-based: It runs on AWS Graviton processors (like the M1/M2 chips in MacBooks). They are faster and cheaper than Intel.
The Cost: In the US-East (N. Virginia) region, a t4g.nano On-Demand instance is roughly $0.0042 per hour. That comes out to about $3.04 per month.
Power: It has 2 vCPUs (burstable) and 512MB RAM. Plenty for a Node.js or Go API handling moderate traffic.
3. The Database: DynamoDB (Free)
If you can use NoSQL, DynamoDB is the ultimate cost-saver.
The Deal: 25GB of storage and 200 million requests per month are Free Forever (not just for 12 months).
Alternative: If you need SQL, use Supabase (Free Tier) or MongoDB Atlas (Free Tier) and connect them to your EC2 instance. Do not use AWS RDS unless you have budget—it starts expensive.
The Deployment Pipeline
Frontend: A GitHub Action builds your React app and runs aws s3 sync ./build s3://my-bucket.
Backend: A simple script SSHs into your EC2 instance and runs git pull && pm2 restart app.
Conclusion
You don't need to pay a "convenience tax" to modern platforms. With a little bit of Linux know-how and the right instance selection (t4g), you can own your infrastructure for less than the price of a latte.
Hi, I'm Frank Oge. I build high-performance software and write about the tech that powers it. If you enjoyed this, check out more of my work at frankoge.com
Top comments (0)