You don't need AWS, i know someone who can do it better and cheaper
Introduction
As a startup founder, or an indie engineer or tech enthusiats, we’ve been conditioned for our first thoughts on cloud deployment to be “AWS”. One would think it’s probably popular because it’s the best on the market or the cheapest, or the easiest to setup
All those are far from true. Imagine a provider requiring you to take certifications just to use their services? that just shows you how unintuitive it is. Well.. I’ve had my fair share of frustrations with AWS but that’s not the point for todays discussion. Today, I want to tell you about someone who can do it cheaper.
The problem
First, let’s paint a few scenarios…
You’re thinking of building an app and you’ve not decided on a cloud provider, then you get to see someone is offering $1K in AWS credits, sounds very interesting deal, you don’t need to spend a dime to get your project running for the first year. But then, by the second year, you’re spending 10x what you should ideally spend to keep your project alive, you got trapped by one year free credit to spend much more than you’ll need to run your infrasture in a decade. Now you’re tightly knit into the architecture, you can’t simply move because you have built your system to work seemlessly with the over engineered AWS ecosystem, earning your self a certified AWS architect badge
You’re building out your simple API then decided lambdas are the best thing to happen since the internet and you decided to host your function there, need to setup serverless do a bunch of configs and as a first timer… you finally got it running, at almost zero cost, then you realized you need to persist your data to db which requires you to configure VPCs, then you need to make extenral api calls to third party services and that forces you to learn about NAT gatewars, then your app isn’t fast enough which tries to make you optimize, then… you introduce warm ups. You find yourself innovating around “artificial problems” that sometimes feel they exist just for profiteering. At first, it was magical, no servers to manage but then once you build something significantly of value that behaves like a real world app, calling multiple apis, making DB queries, sending back feedback to user and collecitng logs, you realize how precisely you must configure your setup just to get things to work, and how fragile it can get when you accidentally change a value.
You’ve built your app which is now running but because of how non deterinistic external api calls are, and how well you need information to effectively debug you learn you’re being billed per how much data you log, how often you read them and how long they last. Then one day you decided to stress test your app and voila… you raked up $2k in AWS bills across logs, lambda, etc. It was meant to be free you say to yourself, but now it’s already too late. You find yourself deciding if you need to remove specific logs just to save cost, then you have to troubleshoot a specific user experience issue and you’re entirely blind.
I’ve been through all of these phases, especially when you realize alot of roles expect you to have mastery of AWS skills.
The realization
I was building Pipersoft which was an inventory management solution that allowed SMEs to easily manage their books and inventory, however we were spending almost $100 monthly to keep our GCP instance running (birds of same feather), we almost went out of business because we were engineers at core and focussed on building awesome solutions but not on how to get it sold (story for another day). Well, to keep the long story short, an independent VPS cost 3x less than it did on GCP and for a product we just chose to kept alive as legacy, it made sense to be able to spend around $10 monthly on server monthly coming from $60-ish.
Then, an old colleague bought me into a project at one of their startups (he’s a seial entrepreneur), and I was getting into trouble with AWS, we weren’t live yet but our bills were getting to around $50 a month just accross lamdas, cognito, s3 and dynamodb (and some other hidden layers we didn’t know we needed to pay for), as someone who came from lean startup backgrounds I felt that was outlandish, if dev environment needed $50 to work, how much do we budget for prod initial stages, also considering that after building a product, it typically took them months to setup the business side, get a business manager, etc. I flaunted the idea of owning our own infra and we spun up a $6 dollar instance which worked fine (but crashed often 😂 due to limited resources and contention), but the point is… for a fixed $6 bill we could get a small online instance to test with. We scaled that instance 2x and it ran alot smoother for testing.
We shipped, they were happy and then i got pinged that they had another project setup by an ex-”company name here” engineer who setup a $400/month cluster for them in testing phase. Not to get too much into the details (I wasn’t even interested in understanding their AWS setup coz I had full permission to nuke and give them something cheaper to test with, plus there was no data to backup). Long story short, 2 serers of $18 each (about 4GB ram) were deployed which served them in testing phase well.
Then i needed to understand, what’s the catch… why is AWS priced premium but gives worse performance (higher latency, slower response, cold starts, etc.). Well, i figured out the catch, there was infact none.
I could go on rambling about how a much more talented mentor optimized a ~$2K AWS bill to a single 64GB ram server costing $120, or how a client was prohibitive and re emphasizing for me to be careful with their AWS account as their previous devs “accidentally” almost bankrupted them. He was shocked to find out we deployed their entire infra on a server which costs less than $60 and responds in under 1s (p95).
The solution
You probably have gotten the drift by now, but if you haven’t, self managed VPS are alot cheaper than managed services, often provide better hardware (becuase you get to pick) than AWS, have lower latency, better performance and overall gives you a better control over your resources. But the management nightmare scares folks away, then in comes Dokploy which gives me a neat UI to deploy and mange my projects and even manage multiple servers. It handles auto deploys, logs, domains, etc. almost anything you’d need to effectively deploy your application, and it’s FREE
Here’s what my current setup looks like, a server from Vultr setup with dokploy, applications setup with docker & docker compose to orchestrate, and pushing code to github auto redeploys my application, i get to see deployment status.
Recommendations
Dedicated servers are better when you’re going into prod and need guaranteed performance.
VPS providers are not equal, two providers might provide identical instances but benchmarking them would give your very different results.
There are publicly available benchmarks, explore them compare providers before deciding
Avoid hostinger, it’s a trap. So far as per my experience, i’ve tried linode, digital ocean, hostinger and Vultr. Vultr has the best performance and Hostinger has the worst.
AVOID any provider that wants you to prepay for morethan a month, it’s usually aa trap for terrible performance
TLDR: AWS is expensive for most usecases, get your self a VPS for predictable billing and easier infra setup.