Cloud cost and cleanup
Estimate cost from independent meters
Cloud delivery is billed across multiple resources. Inventory VM runtime, disks, load-balancer hours and capacity units, public IPs, NAT and data processing, outbound transfer, logging, DNS and optional CDN. Providers meter differently; do not assume one price dimension maps exactly to another. The following numbers are fictional USD rates for a 24-hour design exercise, not vendor quotes. Real estimates require region, currency, SKU, account eligibility, date and official pricing.
2 VMs × 24 h × $0.05/h = $2.401 LB × 24 h × $0.03/h = $0.7210 GB transfer × $0.10/GB = $1.002 GB logs × $0.50/GB = $1.00Hypothetical subtotal = $5.12 (excludes storage, DNS, tax and other fees)Check cost and failure trade-offs together
Compare baseline two-VM delivery with a design that adds a CDN or gateway. Cache public content only; personalized or authorization-dependent responses need a safe cache policy. Lower request load may reduce compute use but not necessarily fixed load balancer, disk or IP charges. A private VM can still require outbound connectivity for approved patching, with potential NAT costs. Consider data paths between zones, regions and the internet. Use a dated estimate with uncertainty and record why every component is necessary. A budget alert is not a guaranteed spending cap.
Design A: two VMs + load balancer + logsDesign B: A + CDN request and transfer chargesDecision evidence: measured cacheability, latency, error rate and full estimateDo not choose B from an assumed cache-hit ratio alone.Plan scoped teardown in dependency order
Before creating anything, label the proposed resources with a lab owner and expiration. For an authorized live extension, stop new traffic, restore previous DNS/routing if applicable, allow draining, detach and delete only lab-owned delivery resources, then remove lab-owned compute, unused disks and addresses. Review shared networks, gateways, certificates and DNS zones with their owners rather than deleting them. Keep required logs and backups according to retention rules. Confirm that asynchronous deletion finished and check later billing for residual charges. Never infer that stopping a VM deletes its disk.
Route rollback → drain → detach target → delete lab LB → delete lab VM→ review disks, addresses, NAT, logs, DNS and backups→ confirm inventory and billing; shared resources remainMake the handoff auditable
The offline worksheet lists resource ownership and expected cleanup decisions. A production change needs a reviewed deployment plan, exact region and SKU, approved budget, IAM roles, health checks, TLS and client identity policy, logging retention, rollback and a cleanup owner. Use provider consoles or IaC only after authorization; the supplied JSON is deliberately not a deployable template. Reconcile estimates against actual bills after the change rather than reporting the exercise as a quote.
Handoff fields: owner | resource | billing meter | expected disposition | evidenceExample: lab disk | storage GB-month | delete if disposable | inventory shows absentExample: shared DNS zone | hosted zone | retain | owner confirmsPractice and next steps
Practice: Run the offline worksheet test. Calculate the subtotal by hand and review every cleanup disposition. Identify omitted charges and a reason to retain each shared resource. Use the staged manual exercise; no live deployment is required.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Cloud cost and cleanup
Assess Cloud delivery design and operational reasoning.
What is the fictional cost subtotal?
Which charge may remain after stopping compute?
Does a budget alert guarantee a spending cap?
How should shared DNS zones be handled?
What validates cleanup?