Skip to main content

I Cut My AWS Bill in Half By Making My Site Boring. Here's How.

ยท Do Minh Tuan ยท Future Pulse ๐Ÿ”ฎ

I Cut My AWS Bill in Half By Making My Site Boring. Here's How.

I used to host my personal site on a small EC2 instance, with a Node.js backend and a MongoDB database. It cost me about $80/month. For a site that got maybe 500 visitors a day, that was embarrassing. So I did what any reasonable developer would do: I over-engineered the solution by moving to serverless, then spent three weeks debugging cold starts, and ended up with an $800/month AWS bill.

I learned two things from that year. First, serverless is amazing in theory and brutal in practice if you don't know exactly what you're doing. Second, every line of code I wrote was generating carbon emissions.

Let me explain the carbon thing, because it's the part most developers don't think about.

Where the emissions actually come from.

The cloud isn't in the cloud. It's in a building somewhere, with metal racks full of computers running 24/7, consuming electricity, most of which comes from fossil fuels. The numbers I've seen most often: data centers consume about 1-2% of global electricity, and that percentage is growing faster than renewables can keep up. By some estimates, the data center industry's carbon footprint now exceeds the airline industry.

Every time you spin up a serverless function, every time you query a database, every time you serve a webpage, you're contributing to that. The amount of CO2 from a single API call is tiny โ€” fractions of a gram โ€” but multiply by billions of API calls per day across the internet, and it adds up.

For a personal site, my contribution was small. But it was also unnecessary. I was running compute that did nothing useful 90% of the time. The servers were idle, but they were still consuming power. Idle compute is the silent killer of both your cloud bill and your carbon footprint.

The boring solution.

I rebuilt my site as a static React app, hosted on Vercel's free tier (which runs on renewable energy in their EU and US regions), with a small serverless function for the contact form. The whole thing is one HTML file, one CSS file, and a few JavaScript bundles. There's no database. There's no always-on server. The pages are pre-built at deploy time and served from the edge.

My AWS bill went from $800/month to $0. Vercel serves the static assets for free. The contact form hits a serverless function that only runs when someone actually submits the form โ€” so it costs me maybe $0.10/month even with 100 submissions.

The carbon savings are also real. Pre-built static sites served from edge networks use about 1% of the energy of a traditional server-based deployment, by the estimate of the Green Web Foundation. For my site, that's the difference between running 1 small server 24/7 and using a few kilowatt-hours per month.

What I learned about the broader pattern.

The boring truth is that the greenest code is the code that doesn't run. Every architectural decision you make has both a performance implication and a carbon implication, and they're often the same decision.

Static sites: green. The page is built once, served infinitely, no compute per request.

CDNs: green. The content is served from a location close to the user, reducing data transfer distance and energy.

Serverless functions for occasional tasks: green-ish. They only run when needed, but cold starts and data transfer add up.

Always-on servers for low-traffic sites: not green. The server runs 24/7 to serve a request that comes once an hour.

Spinning up new VMs or containers for every request: definitely not green. The orchestration overhead alone can exceed the actual work being done.

I see startups with five engineers running multi-region Kubernetes clusters to serve sites that get 200 visitors a day. That's not an engineering achievement, it's a sustainability disaster. The cloud is so cheap and so easy to spin up resources that we've stopped thinking about whether we need them.

What I'd tell engineering managers.

If you run a team, here are three changes you can make this quarter that will both reduce your cloud bill and reduce your carbon footprint, often by 30-50%:

  1. Audit your always-on infrastructure. Anything that's running 24/7 to serve less than 1000 requests per day is probably worth replacing with a serverless alternative or a static version.
  1. Measure your data transfer. Most cloud bills have a "data transfer out" line. If that number is high, you're probably serving large assets inefficiently. Compress images, enable gzip, use modern image formats like WebP and AVIF.
  1. Schedule non-production environments to shut down outside business hours. Your staging environment doesn't need to run at 3am. A simple Lambda function that starts and stops EC2 instances on a cron schedule can save 70% of those costs.

The marketing angle.

I want to be careful here because I see a lot of "green tech" marketing that's just greenwashing. Companies claiming to be carbon-neutral because they bought offsets, while running infrastructure that wastes energy at scale. Don't be that company. Make the engineering changes first, then talk about it.

For my own site, the green angle is genuine: I rebuilt it as a static site because the engineering case was overwhelming, and the carbon and cost savings are the side effects. If you're going to market sustainability, do the work first. Customers can tell the difference.

The honest bottom line.

Going green isn't really about saving the planet in any individual case. One developer switching from EC2 to Vercel is not going to move the needle on global carbon emissions. But it's a step in the right direction, and the engineering benefits are real: lower costs, faster sites, simpler operations. The sustainability win is just a bonus that happens to align with what you should be doing for business reasons anyway.

The boring sites are the green sites. The simple architectures are the sustainable architectures. The engineers who obsess over elegance and minimalism are inadvertently also building the most environmentally friendly systems. If you can hold two ideas in your head at once โ€” "make the site boring" and "save the planet" โ€” both of them might be true.

The actual numbers: my bill before and after

Vague savings claims are cheap, so here are my real numbers. Phase one, the EC2 era: one t3.small in Singapore running Node plus MongoDB on the same box (yes, I know), roughly 80 dollars a month with backups and data transfer. For 500 visitors a day. Embarrassing, but stable.

Phase two, the over-engineered serverless era: API Gateway plus a dozen Lambda functions, DynamoDB on-demand, CloudFront, plus a MongoDB Atlas cluster I kept just in case. The bill peaked at 800 dollars in one month โ€” driven mostly by NAT Gateway data processing charges I did not understand and Lambda invocations from a misconfigured health check pinging every 10 seconds. A health check. Every 10 seconds. For a personal blog. I paid real money to monitor nothing, frequently.

Phase three, boring: static frontend on Vercel free tier, one serverless function for the contact form and newsletter, Upstash Redis for counters, GitHub for backups. Monthly cost: zero dollars, plus roughly 5 dollars in usage spikes during traffic surges. From 800 to 5. The planet math follows the money math: fewer running servers means less electricity burned on my behalf.

The serverless trap: when pay-per-use costs more

Serverless is brilliant for spiky, unpredictable workloads and terrible for steady ones โ€” and most personal or small-business sites are steady and tiny. A t3.nano doing nothing costs pennies. The same nothing spread across API Gateway requests, per-invocation Lambda charges, NAT Gateway processing fees, and CloudWatch log ingestion costs real money, because each AWS service bills its own minimum for your idleness.

Three specific traps from my bill. NAT Gateway: around 32 dollars a month fixed plus per-GB processing โ€” for functions in a VPC that had no business being in a VPC. Fix: keep functions out of VPCs unless they touch RDS. CloudWatch Logs: verbose logging at scale is a line item โ€” set retention to 7 days, log errors not heartbeats. DynamoDB on-demand for predictable reads: provisioned capacity (or just Postgres on a small box) costs a fraction when traffic is flat.

My rule now: serverless for the contact form (spiky, bursty, near-zero baseline), boring static hosting for everything else, and a real server only when something runs 24/7 by nature โ€” game servers, websockets, cron-heavy workers. Match the billing model to the traffic shape.

The caching strategy that cut 70 percent of requests

The greenest request is the one never made. On this portfolio, the architecture is: Cloudflare CDN in front, Vercel edge serving static pages, API routes for dynamic bits with layered caching. Blog content changes weekly at most, so article pages cache for a day at the edge with stale-while-revalidate โ€” visitors always get instant responses, fresh content arrives in the background.

API responses carry their own cache headers: view counters batch writes (increment in Redis, flush periodically, never hit the database per view), RSS regenerates hourly not per request, OG images generate once at build time and serve as static files. Result: origin receives roughly 30 percent of the requests it used to. Fewer function invocations, less database time, lower bill, lower emissions โ€” same content, same experience.

For WordPress folks: this is what cache plugins plus Cloudflare APO do. Full-page cache means your PHP server sleeps while the CDN serves. A cached WordPress site on modest hosting can handle traffic spikes that would melt an uncached one, and the server idlescause it is barely working. Idle is green.

Your halve-the-bill checklist

One: export last month's bill and sort by service. The top two lines are the project โ€” ignore everything else until those shrink. Two: find always-on resources serving near-zero traffic (dev environments running weekends, oversized databases, NAT Gateways for hobby projects). Three: right-size databases first โ€” they are usually the biggest line and the easiest win via caching or downgrading tiers. Four: set log retention to 7 days everywhere. Five: enable CDN caching with real TTLs instead of bypassing cache for logged-out users out of habit. Six: delete what you do not use โ€” old snapshots, unattached volumes, forgotten load balancers. AWS bills every one of them while you forget they exist.

Seven, the cultural one: make one person own the bill and review it monthly for 15 minutes. Not a committee, not a quarterly audit โ€” one owner, monthly, with the authority to delete. At Finantaged this single habit caught a staging environment burning 400 dollars a month for a project that had launched already. Nobody's job was the bill, so nobody looked.

The boring sites are the green sites. The simple architectures are the sustainable architectures. The engineers who obsess over elegance and minimalism are inadvertently also building the most environmentally friendly systems. If you can hold two ideas in your head at once โ€” make the site boring and save the planet โ€” both of them might be true.

The newsletter footprint nobody counts

One more line item people forget: email. Our weekly newsletter blast to hundreds of subscribers runs through SendPulse's shared infrastructure โ€” one API call from a cron job, rendered once, delivered by their optimized fleet. Compare that to the WordPress-era alternative I used to run: a newsletter plugin firing hundreds of individual SMTP sends from my own VPS, each opening connections, retrying soft bounces for days, burning CPU the whole time. Moving newsletters to a purpose-built provider did not just improve deliverability; it deleted an entire category of compute from my bill. Whenever you self-host something a shared service does better โ€” email, search, comments (ours runs on hosted Cusdis plus a tiny KV fallback) โ€” you are usually burning carbon to get a worse result. That is the throughline of everything above: boring, shared, cached, and deleted beats clever, dedicated, dynamic, and accumulated. Audit your own stack this weekend with the checklist โ€” sort the bill, kill the idle, cache the rest โ€” and pocket the difference twice, once in dollars and once in emissions.

Written with AI assistance, reviewed and edited by Do Minh Tuan.