Ravindra BagaleCourses & study guides मराठी Track your progress

AWS Cloud

AWS Cost Optimization and FinOps: Cut Cloud Bills Safely

FinOps is not "never spend". It is knowing who ordered the biryani, whether 40 people ate it, and stopping the buffet when the party ends. AWS bills grow when nobody owns leftovers — idle NAT gateways, forgotten disks, oversized RDS.

In this chapter

  • Why engineers must own cost with product
  • Cost Explorer, Budgets, anomaly detection
  • Rightsizing, SP vs RI, Spot basics
  • Tags, chargeback, idle cleanup
  • Lab, errors, FAQ, interview

1. Everyday example first

A Hyderabad edtech bill jumped 3× after a hackathon left 12 gp3 volumes and an idle ALB. No budget alarm. Finance found out at month end. A $20 budget alert would have pinged Slack on day two.

FinOps is a culture: engineering, finance and product share cloud cost data. On AWS you use Cost Explorer, Budgets, Cost Anomaly Detection, Compute Optimizer, Savings Plans / RIs, and tagging for chargeback. The Well-Architected Cost Optimization pillar is the checklist.

Monthly FinOps loopTags + BudgetsExplorer who spentRightsizing / delete idleBuy SP only with steady baseline
Never buy a 3-year RI on a weekend experiment.

2. Quick wins (first 30 days)

Read a bill like a set of questions. Which service changed, in which account, and on which dates? Break the cost down first, then find what ran. A tag such as Environment=lab helps attach a cost to a project when cost allocation is configured for it. If last week cost 10 units and this week 16, explain the extra 6 before buying any commitment. You might find a storage resource kept after an instance stopped, which has a different fix from a steady workload using more demand than planned.

  1. Turn on Cost Explorer + create a monthly Budget with email/SNS.
  2. Delete idle: unattached EBS, old snapshots, unused EIPs, idle NAT, empty load balancers.
  3. Rightsize EC2/RDS using Compute Optimizer recommendations (staging first).
  4. Require tags: Environment, Team, Application on every create (SCP/policy).
  5. Only then talk Savings Plans for steady production compute.

3. Savings Plans vs Reserved Instances

An on-demand resource charges for usage under its current terms. A Savings Plan trades an ongoing eligible spend commitment for a pricing benefit. First estimate the part that runs every week, then separate an experiment that may be deleted next month. The experiment is evidence for investigating waste, while the stable part is the part you can model for a commitment. Check service, scope and term before treating two options as comparable. The learner’s job here is to explain which usage an option fits and why.

ToolFlexibilityWhen
Compute Savings PlansAcross instance families/regions (rules apply)Default modern choice for steady compute
EC2 Instance SP / RINarrowerVery stable same-family fleets
SpotCheapest, can reclaimStateless / fault-tolerant workers
CUD-style for othersSageMaker/etc. have own modelsRead service-specific pages

Ravindra Bagale's Tip

A Budget without an owner is decoration. Put a human and a Slack channel on every alarm.

4. Industries

  • SaaS: per-tenant cost tags for gross margin.
  • Banks: showback to business units monthly.
  • Startups: survival — kill staging at night.
  • Data lakes: S3 storage class + lifecycle > bigger clusters.
  • Agencies: separate linked accounts per client.

5. Mini lab: Budget + idle hunt

Use read-only billing data from a permitted training account or a sample sheet. Group by service and date, then pick one suspicious increase. Write the owner, the evidence for whether it is needed and a reversible first action. If you configure a budget in the lab, check the budget amount, actual or forecasted threshold, and notification destination. A successful alert setup helps someone act; it does not stop resources from accruing charges on its own.

Do this in ap-south-1 (Mumbai) unless your org forbids it. Set a budget alert first.

  1. Billing → Budgets → create cost budget $10 with email alert at 80%.
  2. EC2 → Elastic IPs: release unused.
  3. EC2 → Volumes: note unattached; snapshot then delete if lab junk.
  4. Cost Explorer: group by Service last 7 days; screenshot top 3.
  5. Optional: enable Cost Anomaly Detection.

Cleanup (stop billing)

  1. Leave the Budget on — it is cheap insurance.
  2. Document what you deleted in a notes file.

6. Common errors and fixes

Each row is a real mistake students and juniors hit. Read the fix before you panic.

Error / symptomFix
Bill shock, no alertsCreate Budgets same day as account.
Untagged resourcesEnforce required tags via IAM/SCP.
RI / SP purchase too earlyNeed 2–4 weeks of stable baseline.
NAT gateway forgottenOne NAT ~ nontrivial monthly — share or delete labs.
Gp2 leftovers after gp3 moveDelete old volumes/snapshots.
Data transfer surpriseWatch cross-AZ and internet egress.
Explorer emptyWait 24h after enable; check correct account/management view.
Finance-only FinOpsEngineers must see dashboards weekly.
Orphan snapshotsLifecycle policies on AMIs/EBS.
Over-cleaning prodChange windows + peer review before delete.

7. Troubleshooting checklist

  1. Confirm you are in the payer / correct linked account view.
  2. Budgets SNS email in spam? Confirm subscription.
  3. Cost Explorer granularity daily for recent spikes.
  4. Compute Optimizer needs hours of metrics — wait.
  5. Tag Editor to find missing Environment tags.

8. FAQ

Q. Is FinOps only for huge companies?

No — a $50/month student account benefits from a $5 budget.

Q. Savings Plans refundable?

Generally non-refundable commitments — model carefully.

Q. What is showback vs chargeback?

Showback reports; chargeback actually bills teams.

Q. Does S3 Intelligent-Tiering always win?

Often for unknown access; small objects have caveats.

Q. Well-Architected Cost tool?

AWS WA Tool includes Cost pillar questions — use it.

9. Interview Q&A

Q. First three cost actions in a messy account?

Budgets, idle cleanup, tags.

Q. SP vs RI?

SP usually more flexible for compute; RI for specific stable shapes.

Q. How do tags help FinOps?

Allocate spend to Team/App for ownership.

Q. What is rightsizing?

Match instance/DB size to actual utilization.

Q. Who owns cloud cost?

Shared — engineering creates, finance governs, product prioritizes.

Q. Spot risk?

Interruptions — use for tolerant workloads with checkpoints.

10. Tips in English, Marathi and Hindi

Ravindra Bagale's Tip (EN)

Every lab needs a destroy step written before the create step.

Ravindra Bagale's Tip (MR)

प्रत्येक lab ला create आधी destroy step लिहा.

Tip (HI)

हर lab में create से पहले destroy स्टेप लिखो।

Try at home

  1. Create a $5 budget on your sandbox.
  2. List idle resources in a table: type, id, monthly guess.
  3. Propose 5 required tags for your team.

In short

  1. FinOps = shared ownership of cloud spend.
  2. Budgets + tags + idle cleanup before commitments.
  3. Rightsizing beats blind RI shopping.
  4. Write destroy steps into every lab.

Revision, interview and comparison cards

Revise this lesson in a few minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens this lesson.

Revision card: What is cloud FinOps?. Engineering ships features; finance sees a surprise AWS bill. Nobody owns the gap. FinOps is the practice of teams sharing ownership of cloud spend: visibility, accountability, and optimization. Tag resources → Cost Explorer / CUR → budgets and anomaly alerts → right-size and buy commitments carefully. A weekly review shows idle gp3 volumes; deleting them cuts waste without touching prod traffic.
Revision card: What is cloud FinOps? · Download PNG · Open card page
Revision card: Cost Explorer views. Looking only at the total invoice hides which service or team grew. Cost Explorer groups cost by service, account, region, and tag over a date range. Filter last 30 days; group by Service; then by tag Project for the top service. You see EC2 up 40% on Project=ml-lab after a forgotten g4 instance.
Revision card: Cost Explorer views · Download PNG · Open card page
Revision card: Budgets and anomaly alerts. Finding out about spend on the monthly invoice is too late for a student lab. AWS Budgets warn at thresholds. Cost Anomaly Detection flags unusual spikes automatically. Create a monthly budget with 50/80/100% email alerts; enable anomaly monitor on the account. Crossing 80% emails the owner the same day the lab cluster was left up.
Revision card: Budgets and anomaly alerts · Download PNG · Open card page
Revision card: Right-size before RIs. Buying Reserved Instances for oversized servers locks in waste for a year. First stop idle resources and downsize. Then consider Savings Plans/RIs for steady baseline only. Use Compute Optimizer / CW metrics; resize or schedule off-hours stop for non-prod. A t3.large at 5% CPU becomes t3.small; only then buy a Savings Plan for the steady web tier.
Revision card: Right-size before RIs · Download PNG · Open card page
Revision card: Lab cleanup checklist. NAT gateways, idle ALBs, and unattached EIPs silently bill after class. Same-day cleanup: ASG=0, delete ALB/NAT if unused, release EIP, delete idle EBS/EFS, empty unused ECR. Keep a short checklist in every lab README; verify Cost Explorer next morning. Morning bill shows near-zero for the lab account after checklist.
Revision card: Lab cleanup checklist · Download PNG · Open card page
Comparison: Reserved Instances vs Savings Plans. Reserved Instances: Discount tied more tightly to instance attributes. Savings Plans: Flexible $/hour commitment across families (compute SP).
Comparison: Reserved Instances vs Savings Plans · Download PNG · Open card page
Comparison: Cost Explorer vs AWS Budgets. Cost Explorer: Interactive charts to analyze past/future spend. AWS Budgets: Threshold alerts (cost/usage/RI utilization).
Comparison: Cost Explorer vs AWS Budgets · Download PNG · Open card page
Interview card: What is FinOps in one line?. Shared ownership of cloud spend with data, accountability, and continuous optimization. Not only “cut cost” — also spend wisely where it creates value. Tagged accounts + budgets + monthly review is a beginner FinOps loop.
Interview card: What is FinOps in one line? · Download PNG · Open card page
Interview card: RI/SP before or after cleanup?. After. Commitments on waste lock the waste in. Remove idle, right-size, then buy Savings Plans/RIs for steady baseline. Forgotten g4 lab should be stopped, not reserved.
Interview card: RI/SP before or after cleanup? · Download PNG · Open card page
Interview card: Which tags matter for chargeback?. Environment, Owner/Team, Project/CostCenter — enforced with policy or Organization tag policies. No tags means no fair bill split. Cost Explorer group-by Project shows which course burned GPU hours.
Interview card: Which tags matter for chargeback? · Download PNG · Open card page
Interview card: What is a cloud unit cost?. Spend divided by a business metric (per order, per active user, per GB served). FinOps uses unit cost to see if efficiency improves even when total spend grows. ₹ per checkout fell after cache hit ratio rose, even in a busier month.
Interview card: What is a cloud unit cost? · Download PNG · Open card page

More cards: Ravi Sir's Cards.

Practise this chapter

Interview questions and answers

A cloud bill rose by six cost units this week. How do you start?

Compare the same time window by service, account and usage. Find the resource and owner behind the increase and check whether it is still doing needed work. Use a budget and the relevant evidence to detect changes before discussing any long-term commitment.

Check your understanding

Choose an answer, then compare your reasoning with the explanation.

0 of 3 answered correctly
1. A budget sends an actual-cost threshold notification. What does that prove?

Answer and explanation

C. The monitored threshold triggered a notification

A budget alert is a signal for action. Any action that changes resource access or lifecycle is a separate choice.

2. Which workload is a more reasonable one to model for a savings commitment?

Answer and explanation

B. Steady eligible usage expected to continue

A commitment is suited to a predictable baseline. Inspect what the specific plan covers first.

3. What can activated cost allocation tags help answer?

Answer and explanation

A. Which billed usage belongs to a given project or team

The reporting tags help group eligible costs. A resource’s operation requires separate evidence.

Practice Tasks

Practice checks run in your browser. They check the answer for this exercise; they do not create resources or connect to your AWS account.

About this scenario

Ahmednagar Sugar Co-op is a sugar co-operative business in Ahilyanagar. Balasaheb Pawar looks after its IT and cloud work. They count money in INR and run their AWS resources in the ap-south-1 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.

0 / 16

Easy Get cost and usage

See the bill drivers.

Get cost and usage with time period 2026-01-01 to 2026-02-01 granularity MONTHLY metrics UnblendedCost.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy Describe a budget

Track spend caps.

Describe budget nagarsugar-monthly for account 131959625285.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy Describe instances for waste hunt

Find stopped vs running.

Describe instances in ap-south-1.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy Describe volumes

Orphan EBS costs money.

Describe volumes in ap-south-1.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy List buckets for unused data

Old logs in S3.

List buckets.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy 1-year Reserved Instance term

Commitment length.

How many years is a common Reserved Instance term taught first?

  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Easy 3-year Savings Plan option

Longer term more discount.

What is the longer common Savings Plans term in years?

  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Medium Cost by SERVICE

Find expensive services.

Get cost and usage Start 2026-01-01 End 2026-02-01 MONTHLY UnblendedCost group-by Type DIMENSION Key SERVICE.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Cost by tag Project

Tags power chargeback.

Get cost and usage Start 2026-01-01 End 2026-02-01 MONTHLY UnblendedCost group-by Type TAG Key Project.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Get cost forecast

Predict month end.

Get cost forecast Start 2026-10-01 End 2026-11-01 MONTHLY UnblendedCost.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Budget alert at 80 percent

Alert before breach.

If you alert at 80 percent of budget, what number is that?

  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Medium Allow Cost Explorer read

FinOps role.

Allow ce:GetCostAndUsage and ce:GetCostForecast on *.

  1. Start with { "Version": "2012-10-17", "Statement": [ ... ] }.
  2. In each statement write Effect, Action and Resource.
  3. Give only what the task needs (least privilege).
  4. Use double quotes and commas correctly. Click Check answer.

Hard Get rightsizing recommendation

Downsize idle EC2.

Get EC2 rightsizing recommendation.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Savings Plans coverage

Measure commitment use.

Get Savings Plans coverage Start 2026-01-01 End 2026-02-01 granularity DAILY.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Budget limit JSON

Budget API shape.

JSON Budget with BudgetName monthly, BudgetLimit Amount 100 Unit USD, TimeUnit MONTHLY, BudgetType COST.

  1. Start from the top-level keys the task names.
  2. Indent child keys with 2 spaces (no tabs).
  3. Fill in each property with the value from the task.
  4. Click Check answer. Key order does not matter.

Hard Required cost tags document

Enforce Project and Env.

JSON tags required: Project and Env as keys in an array required_tags.

  1. Start from the top-level keys the task names.
  2. Indent child keys with 2 spaces (no tabs).
  3. Fill in each property with the value from the task.
  4. Click Check answer. Key order does not matter.