teluzia.Cloud Engineer · Day 135
CHAPTER 20 · COST MANAGEMENT AND SECURITY

Budgets, alerts and rightsizing

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Budgets and alerts is today's starting point. A 100-unit monthly budget alerts at 80 actual units or a chosen forecast threshold. The email can arrive after additional usage; it is a detection mechanism rather than an automatic capacity shutdown. You will connect this with rightsizing and safe cost control. The lesson's artifact brings these decisions together: Compare three fictional instance profiles with CPU, memory and peak latency; recommend one reversible resize and draft a budget alert specification.

Think of it this way

A budget alert is a fuel warning, while rightsizing chooses the engine; the warning does not stop consumption and a smaller engine must still handle the trip.

TOPIC 01 / 03Step by step

Budgets and alerts

A budget compares actual or forecasted spend against a configured amount. An alert is a notification, not a guaranteed spending cap; verify recipients and update cadence. A 100-unit monthly budget alerts at 80 actual units or a chosen forecast threshold. The email can arrive after additional usage; it is a detection mechanism rather than an automatic capacity shutdown.

WORKED EXAMPLE
A 100-unit monthly budget alerts at 80 actual units or a chosen forecast threshold. The email can arrive after additional usage; it is a detection mechanism rather than an automatic capacity shutdown.

An actual-spend threshold evaluates recorded usage; a forecast threshold uses an estimate; a budget action is a configured response distinct from notification. Imagine actual spending is below the budget but projected month-end spend is above it after a traffic surge. Explain why the forecast can trigger before the actual threshold and why either signal can arrive after more usage accrues. Verify the time period, cost filters and authorized recipient. A budget scoped only to compute may omit transfer and logging, so compare its scope with the intended control objective. Low thresholds detect change early but can produce frequent non-actionable notifications. Define what the owner does next, such as checking the cost driver, rather than claiming an email itself enforces a spending ceiling.

Why this matters

The email can arrive after additional usage; it is a detection mechanism rather than an automatic capacity shutdown.

A common trap

A budget notification guarantees spend stops at the configured amount.

MAKE IT VISIBLE

Explore an alarm decision

SAME DATA. DIFFERENT DECISION.

Will this CPU alarm fire?

Compare five synthetic one-minute samples with an M-of-5 alarm. Each sample represents one period here; real CloudWatch statistics may aggregate multiple observations within a period.

M-OF-5 ALARMALARM · 3 breaches
5-MINUTE AVERAGE65.4% · not above threshold
✦

The individual periods trigger this alarm even though the five-minute average stays below the threshold. Averaging can hide a burst. Missing-data policies, action routing, and recovery behavior still need configuration in a real alarm.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Budgets and alerts

A budget compares actual or forecasted spend against a configured amount. An alert is a notification, not a guaranteed spending cap; verify recipients and update cadence. A 100-unit monthly budget alerts at 80 actual units or a chosen forecast threshold. The email can arrive after additional usage; it is a detection mechanism rather than an automatic capacity shutdown.

WORKED EXAMPLE
A 100-unit monthly budget alerts at 80 actual units or a chosen forecast threshold. The email can arrive after additional usage; it is a detection mechanism rather than an automatic capacity shutdown.

An actual-spend threshold evaluates recorded usage; a forecast threshold uses an estimate; a budget action is a configured response distinct from notification. Imagine actual spending is below the budget but projected month-end spend is above it after a traffic surge. Explain why the forecast can trigger before the actual threshold and why either signal can arrive after more usage accrues. Verify the time period, cost filters and authorized recipient. A budget scoped only to compute may omit transfer and logging, so compare its scope with the intended control objective. Low thresholds detect change early but can produce frequent non-actionable notifications. Define what the owner does next, such as checking the cost driver, rather than claiming an email itself enforces a spending ceiling.

Why this matters

The email can arrive after additional usage; it is a detection mechanism rather than an automatic capacity shutdown.

A common trap

A budget notification guarantees spend stops at the configured amount.

Rightsizing

Rightsizing matches capacity to observed demand and performance requirements. CPU averages alone omit memory, peak traffic and availability needs; collect a representative window before recommending changes. A host averages 15% CPU but reaches 90% memory during nightly jobs. Reducing memory based only on CPU can trigger swapping or termination, so review peaks, latency and a representative workload window.

WORKED EXAMPLE
A host averages 15% CPU but reaches 90% memory during nightly jobs. Reducing memory based only on CPU can trigger swapping or termination, so review peaks, latency and a representative workload window.

Utilization measures used capacity; saturation signals an exhausted resource; headroom is spare capacity reserved for peaks and failures. Consider a service whose mean CPU looks low while a brief scheduled job saturates storage throughput. Inspect representative peak intervals, memory and I/O before recommending a smaller instance. Compare p95 latency and failed requests under equivalent workloads, then change one capacity attribute in a controlled environment. Include availability requirements: one replica's spare capacity may be needed when another fails. A provider recommendation is input to review, not a complete workload test. Rightsizing can reduce waste, but aggressive reductions make spikes and failures harder to absorb. Record the performance criterion and rollback trigger that would invalidate the savings proposal. Memory peaks can invalidate CPU-led conclusions.

Why this matters

Reducing memory based only on CPU can trigger swapping or termination, so review peaks, latency and a representative workload window.

A common trap

Low average CPU proves every workload can use a smaller instance.

Safe cost control

Separate cost reduction from service degradation. Document rollback capacity, availability constraints and licensing implications; measure the same workload before and after a proposed resize. A proposed reduction from two replicas to one lowers capacity but removes a failure domain. Compare a smaller two-replica option and retain a tested rollback before choosing the apparent cheapest configuration.

WORKED EXAMPLE
A proposed reduction from two replicas to one lowers capacity but removes a failure domain. Compare a smaller two-replica option and retain a tested rollback before choosing the apparent cheapest configuration.

A cost control changes usage; a guardrail limits an unsafe choice; a rollback restores the former capacity or configuration. Imagine reducing log retention saves storage but removes the incident investigation window the team requires. Compare savings with operational consequences and agree on the minimum retention need. For resource resizing, capture the old configuration and capacity assumptions so restoration is possible. For deletion, confirm ownership and data-retention obligations before acting; an apparent idle resource may serve a recovery requirement. Budget figures in a training table are illustrative cost units, not current service prices. Controls can be automated when ownership and conditions are explicit, but broad automation can damage shared workloads. Test the decision in a sandbox or paper model before attaching a real action to a spending threshold.

Why this matters

Compare a smaller two-replica option and retain a tested rollback before choosing the apparent cheapest configuration.

A common trap

Removing redundancy is always a safe way to lower cost.

KEEP THESE WITH YOU

Today’s takeaways

Budgets and alerts: A budget compares actual or forecasted spend against a configured amount.

Rightsizing: Rightsizing matches capacity to observed demand and performance requirements.

Safe cost control: Separate cost reduction from service degradation.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed