Skip to the build
Cost lab

Photo-sharing app

SeniorBudget $8,600 a month
  1. Step 1 of 3: Fit the load, done
  2. Step 2 of 3: 2Hit the budget
  3. Step 3 of 3: 3Defend your bill

Catalogue

Compute

$884.76 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

$453.17 a month

Where the data lives.

Kind
Capacity mode

On-demand: pay per request. Provisioned: pay for capacity sized to the peak, all month, at a lower price per request.

Storage and delivery

$11,244 a month

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

Storage class

Infrequent Access is cheaper to keep and charges $0.01 per GB read back. Only objects nobody read for a month are moved.

Logs and monitoring

$209.88 a month

Needs to be kept at least 30 days.

Retention (days)

Nightly batch jobs

$1,515 a month

Work nobody is waiting for.

How you pay
Monthly bill
$14,373
₹13,65,468 at ₹95 per $
Budget
$8,600
₹8,17,000

Monthly bill $14,373 (budget $8,600) · meets peak ✓ · availability ✓

$5,773 over budget, requirements met.

Checks

Handles the peakpassed
At peak 868 requests/s reach your servers (10 ms of CPU each, run at 60% load) = 14.5 vCPU. That is 4 x m6i.xlarge; you allow 6. DynamoDB takes the load either way (on-demand scales itself; provisioned is sized to the peak here).
Availability: 99.95% (survives a zone loss)passed
Servers in two zones, a standby database, no all-Spot fleet.
Latency: p99 under 300 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 ($8,600 a month)failed
$5,773 over budget.

The bill, line by line

Compute

$2,400
  • m6i.xlarge servers, on-demand$884.76
    6 x m6i.xlarge x $0.202/h x 730 h = $884.76
  • Nightly batch jobs, on-demand$1,515
    30,000 vCPU-hours x $0.0505 = $1,515

Database

$453.17
  • DynamoDB, on-demand$346.29
    1.5B reads x $0.0000001425 + 182.5M writes x $0.00000071 = $346.29
    You pay per request: nothing to size, nothing wasted at 4 am.
  • DynamoDB storage$106.87
    (400 - 25 free) GB x $0.285 = $106.87

Storage

$3,462
  • Object storage (Standard)$3,072
    122,880 GB x $0.025 = $3,072
  • Object requests$390.00
    30M PUT x $0.000005 + 600M GET x $0.0000004 = $390.00

Monitoring

$209.88
  • Logs ingested$201.00
    300 GB x $0.67 = $201.00
  • Logs stored (30 days)$8.88
    300 GB x 30 / 30.4 days = 296 GB x $0.03 = $8.88

Network

$7,849
  • Load balancer$66.11
    730 h x ($0.0239 + 8.33 LCU x $0.008) = $66.11
    LCU: the larger of new connections (25 a second) or 1 GB an hour.
  • Internet egress$7,782
    10,240 GB x $0.1093 + 40,960 GB x $0.085 + 38,800 GB x $0.082 = $7,782

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