Skip to the build
Cost lab

E-commerce sale month

StretchBudget $7,750 a month
  1. Step 1 of 3: 1Fit the load
  2. Step 2 of 3: 2Hit the budget
  3. Step 3 of 3: 3Defend your bill

Catalogue

Compute

$27,133 a month

What runs your code.

Kind
Server size
How you pay

Reserved: a 1-year commitment, cheaper, paid all month. Spot: spare capacity, can be taken back with 2 minutes notice.

How many servers you run
Scaling

Fixed: the same number all month. Autoscale: follows the load, billed on the average (plus slack).

Database

$3,164 a month

Where the data lives.

Kind
Size

Rated for reads and writes per second; a write costs three times a read.

Read replicas

Copies that answer reads. They do not take writes and do not fail over automatically.

How you pay

Cache

$0.00 a month

Memory in front of the database (Valkey).

Nodes

More memory holds more of what is read again and again.

Storage and delivery

$2,374 a month

Files, bytes out to users, and what answers them.

Logs and monitoring

$629.63 a month

Needs to be kept at least 30 days.

Retention (days)

Nightly batch jobs

$1,010 a month

Work nobody is waiting for.

How you pay
Monthly bill
$34,619
₹32,88,827 at ₹95 per $
Budget
$7,750
₹7,36,250

Monthly bill $34,619 (budget $7,750) · meets peak ✗ · availability ✓

$26,869 over budget, and a check fails.

Checks

Handles the peakfailed
At peak 4,167 requests/s reach your servers (100 ms of CPU each, run at 60% load) = 694 vCPU. That is 44 x m6i.4xlarge; you allow 46. At peak the primary does 417 writes/s (x3 weight) + 5,556 reads/s = 6,806 units; a db.m6g.2xlarge is rated 4,800, so 3,360 at 70% load. Each replica does 5,556.
Availability: 99.95% (survives a zone loss)passed
Servers in two zones, a standby database, no all-Spot fleet.
Latency: p99 under 400 mspassed
No cold starts on the request path, and reads come from memory where it matters.
Logs kept at least 30 dayspassed
Retention is 30 days.
The choices fit the workloadpassed
Nothing in the design contradicts the workload.
Within budget ($7,750 a month)failed
$26,869 over budget.

The bill, line by line

Compute

$28,143
  • m6i.4xlarge servers, on-demand$27,133
    46 x m6i.4xlarge x $0.808/h x 730 h = $27,133
  • Nightly batch jobs, on-demand$1,010
    20,000 vCPU-hours x $0.0505 = $1,010

Database

$3,164
  • PostgreSQL primary (db.m6g.2xlarge Multi-AZ)$1,320
    db.m6g.2xlarge x $1.81/h x 730 h = $1,320
  • Read replicas (2)$1,320
    2 x db.m6g.2xlarge x $0.904/h x 730 h = $1,320
    A replica takes reads. It does not take writes.
  • Database storage (gp3)$524.00
    1,000 GB (data + 25% room) x $0.262 + 2 replicas x 1,000 GB x $0.131 = $524.00

Monitoring

$629.63
  • Logs ingested$603.00
    900 GB x $0.67 = $603.00
  • Logs stored (30 days)$26.63
    900 GB x 30 / 30.4 days = 888 GB x $0.03 = $26.63

Network

$2,683
  • Load balancer$309.45
    730 h x ($0.0239 + 50 LCU x $0.008) = $309.45
    LCU: the larger of new connections (25 a second) or 1 GB an hour.
  • Internet egress$2,374
    10,240 GB x $0.1093 + 14,760 GB x $0.085 = $2,374

Mumbai (ap-south-1), 730 hours a month. List prices checked 2026-10-19: the price table below has the sources and what is left out.

Where the prices come from