engineering·8 min read

What a small app actually costs on AWS, line by line

One small web app, one container, one database-free setup, running all month on AWS: about $42. The surprise is not the total. It is that $24.31 of it has nothing to do with running your code.

Every figure below is an AWS list price in us-east-1, multiplied by 730 hours, which is the month AWS bills you for. No reserved instances, no savings plans, no negotiated rate. You can check each one on AWS’s own pricing pages, and you should.

The bill for one container behind a load balancer

This is the shape almost every tutorial gives you: an ECS Fargate task with half a vCPU and a gigabyte of memory, sitting behind an Application Load Balancer, in a VPC with public subnets.

Fargate vCPU0.5 vCPU × $0.04048/vCPU-hour × 730h$14.78
Fargate memory1 GB × $0.004445/GB-hour × 730h$3.24
Load balancer hours$0.0225/hour × 730h$16.43
Load balancer capacity units0.1 LCU for a quiet app$0.58
Public IPv4 addresses2 × $0.005/hour × 730h — one per public subnet$7.30
Total$42.33

Compute is $18.02. The edge is $24.31. Fifty-seven percent of the bill is the load balancer and the two IP addresses it holds, and both of those cost exactly the same whether you serve one request a month or a million.

The two line items nobody warns you about

Public IPv4 addresses are no longer free

Since February 2024, AWS charges $0.005 per hour for every attached public IPv4 address. That is $3.65 a month each. An ALB in two subnets holds two of them, so $7.30 a month before a single byte moves. A Fargate task with a public IP adds another $3.65.

It is a small number that appears in a lot of places. It is also the line item most cost calculators leave out, which is part of why estimates made before you deploy tend to land low.

A NAT gateway costs more than your app

A NAT gateway is $0.045 per hour, which is $32.85 a month in hourly charges alone, before the per-gigabyte processing fee. That is more than the container it exists to give internet access to.

Most tutorials include one because the standard VPC diagram has one. For a small app it is usually avoidable: put the task in a public subnet with an assigned public IP and you pay $3.65 instead of $32.85. You lose the property that your compute is unreachable from the internet, which matters for some workloads and not for a marketing site. It is a real tradeoff, worth making deliberately rather than by copying a diagram.

What the same app costs in other shapes

Static site on S3 and CloudFrontNo hourly charge at all. 1 TB/month egress and 10M requests are permanently free~$0
Container, no load balancerTask with a public IP; the address changes on every redeploy$21.67
Container behind a shared load balancerThe ALB cost split across every app using it$18.02 + share
Container behind its own load balancerThe shape above$42.33
Add a NAT gatewayHourly charge only+$32.85
Add managed Postgres (db.t4g.micro, 20 GB gp3)Instance hours plus storage+$14.60

The static row is the one worth staring at. CloudFront has no base fee. An idle distribution costs nothing, unlike a load balancer at $16.43 a month just for existing. If your app is a React, Vue, Svelte or Vite build with no server code, it can be files in a bucket behind a CDN, and the bill rounds to zero.

The gap between $0 and $42 for the same visible product is not a discount. It is the difference between serving files and keeping a machine alive to serve files.

Three rules that follow from the numbers

Fixed costs dominate small apps. Compute was 43% of that bill. Optimising your container size is the smallest lever you have. The load balancer, the NAT gateway and the IP addresses are the bill, and they are all decisions made once at provisioning time.

Anything hourly is the enemy of a small app. Per-request pricing scales down to nothing when nobody visits. Per-hour pricing does not care. A side project with ten users a week pays the same $16.43 for its load balancer as a business does.

Share the fixed parts. One load balancer can route to many apps by hostname. Ten apps behind one ALB pay $2.43 each for the edge instead of $24.31. This is the single biggest structural saving available to anyone running more than one small app, and it is why per-app platform pricing beats per-app infrastructure.

Why we publish this

Eigon deploys apps onto AWS, so these are the numbers behind our own estimates. We show a projected monthly cost before anything is created and an itemised breakdown after, because “your app costs $42” is not useful and “$16.43 of it is a load balancer you may not need” is.

It also means we cannot quietly benefit from the confusion. If your app is static, we put it on S3 and CloudFront and it costs you nearly nothing. If it needs a server, we tell you what the server costs before you agree to it.

Want the number for your own repository before creating anything? Paste a public repo URL and you get the services it would need and the projected monthly bill. No account required.

Sources

All prices are AWS list prices for us-east-1, checked against AWS pricing pages, and multiplied by 730 hours. Fargate $0.04048 per vCPU-hour and $0.004445 per GB-hour. Application Load Balancer $0.0225 per hour plus $0.008 per LCU-hour. Public IPv4 $0.005 per address-hour. NAT gateway $0.045 per hour plus data processing. CloudFront $0.085 per GB after the free tier, with no fixed monthly charge. RDS gp3 storage $0.117 per GB-month. Prices change and vary by region; check them for yours.