Stop 11 · Cloud Architecture PatternsTopics · 9/9

Cost-Optimized Architecture Design

Part of the Cloud Computing Roadmap

In short

Cloud bills grow quietly: an oversized database here, forgotten logs there. Designing for cost from the start is much easier than cutting a scary bill later.

Designing with cost as a first-class architectural concern from the start — choosing serverless for spiky workloads, right-sizing compute, and using storage tiers appropriately, rather than optimizing cost only after a bill shock.

The blob character sits with a piggy bank and train tickets, planning a trip.

Think of it like this

Planning the trip budget

Before a hostel trip to Goa, you compare sleeper versus AC, shared rooms versus hotels, and book early for cheaper fares. Nobody books a five-star suite just in case. Cloud design is the same budgeting, done before you leave.

Watch it happen

Where a bill can shrink

Monthly bill
Compute
Right-size
Savings Plans
Storage
Lifecycle tiers
Data transfer
CDN + same AZ
Idle stuff
Schedules

1/5Break the bill into a few big buckets and attack the largest first.

The big ideas

What you need to know

Match pricing to traffic

Spiky traffic suits serverless or autoscaling. Steady traffic suits reserved capacity or Savings Plans.

Tag everything

Tags like team, env and project let you see who's spending what. Untagged spend is unexplained spend.

Spot for batch

Spot instances are heavily discounted but can be reclaimed with a two-minute warning. Great for batch jobs and CI.

Budgets first

Set budget alerts on day one, before any architecture choice can surprise you.

See it in code

Walk through the code

json
1{2  "Rules": [{3    "ID": "age-out-logs",4    "Filter": { "Prefix": "logs/" },5    "Status": "Enabled",6    "Transitions": [7      { "Days": 30, "StorageClass": "STANDARD_IA" },8      { "Days": 90, "StorageClass": "GLACIER" }9    ],10    "Expiration": { "Days": 365 }11  }]12}

1/3One rule, only for objects under logs/.

Apply with aws s3api put-bucket-lifecycle-configuration --bucket my-bucket --lifecycle-configuration file://rules.json

Save yourself the pain

Common mistakes

Oops

Choosing instance sizes by guessing high "to be safe".

Do this instead

Start small, watch CPU and memory metrics for a week, then right-size using real numbers.

Oops

Optimising a ₹200 line item while a forgotten NAT gateway costs far more.

Do this instead

Sort Cost Explorer by service and fix the biggest bars first.

Your mission

Hunt for waste

~30 min

Quick check

A nightly batch job can restart if interrupted. Which pricing option fits best?

Go deeper

  1. 1Redesign a hypothetical over-provisioned architecture with cost efficiency in mind.
  2. 2Learn to estimate a rough monthly cost for an architecture before building it.
  3. 3Practice presenting an architecture decision with both technical and cost reasoning together.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge