Cost Optimization
Reduce and optimize cloud infrastructure spending without sacrificing performance or reliability. Trigger keywords: cloud costs, cost optimization, FinOps, reserved instances, spot instances, rightsizing, cloud billing.
Cloud cost optimization is the ongoing practice of aligning cloud spending with actual business value. The cloud's pay-as-you-go model is a double-edged sword: it eliminates upfront capital expenditure but can produce runaway costs without discipline. Effective cost management treats cloud spending as an engineering ## Key Points - **Rightsizing**: Analyze actual resource utilization and resize instances, databases, - **Reserved Instances and Savings Plans**: Commit to steady-state usage for 1-3 - **Spot/Preemptible Instances**: Use discounted interruptible compute (60-90% off) - **Auto-Scaling**: Scale resources dynamically with demand rather than provisioning - **Storage Tiering**: Move infrequently accessed data to cheaper storage classes - **Cost Allocation Tags**: Tag every resource with business metadata (team, project, - Implement cost visibility dashboards accessible to engineering teams, not just - Set up billing alerts at multiple thresholds to catch unexpected spending spikes - Review costs weekly and investigate any line item that increased more than 20%. - Shut down non-production environments outside business hours. Development and - Delete unused resources aggressively: unattached EBS volumes, old snapshots, - Use cost as a metric in architecture reviews. A design that costs 3x more should
skilldb get devops-cloud-skills/cost-optimizationFull skill: 71 linesCloud Cost Optimization
Core Philosophy
Cloud cost optimization is the ongoing practice of aligning cloud spending with actual business value. The cloud's pay-as-you-go model is a double-edged sword: it eliminates upfront capital expenditure but can produce runaway costs without discipline. Effective cost management treats cloud spending as an engineering problem, not just a finance concern. Every engineer who provisions resources is making spending decisions and should be empowered with visibility and accountability.
Key Techniques
- Rightsizing: Analyze actual resource utilization and resize instances, databases, and storage to match real workload requirements. Most cloud resources are significantly over-provisioned.
- Reserved Instances and Savings Plans: Commit to steady-state usage for 1-3 years in exchange for significant discounts (30-70%). Apply to predictable baseline workloads.
- Spot/Preemptible Instances: Use discounted interruptible compute (60-90% off) for fault-tolerant workloads like batch processing, CI/CD, and stateless workers.
- Auto-Scaling: Scale resources dynamically with demand rather than provisioning for peak capacity at all times.
- Storage Tiering: Move infrequently accessed data to cheaper storage classes (S3 Infrequent Access, Glacier, Archive) automatically using lifecycle policies.
- Cost Allocation Tags: Tag every resource with business metadata (team, project, environment) to attribute costs accurately and identify waste by owner.
Best Practices
- Implement cost visibility dashboards accessible to engineering teams, not just finance.
- Set up billing alerts at multiple thresholds to catch unexpected spending spikes early.
- Review costs weekly and investigate any line item that increased more than 20%.
- Shut down non-production environments outside business hours. Development and staging resources running 24/7 can cost as much as production.
- Delete unused resources aggressively: unattached EBS volumes, old snapshots, idle load balancers, orphaned elastic IPs.
- Use cost as a metric in architecture reviews. A design that costs 3x more should deliver proportionally more value.
- Negotiate enterprise discount programs when total cloud spend justifies it.
Common Patterns
- FinOps Practice: A cross-functional team of engineering, finance, and operations that continuously optimizes cloud spending through data-driven decisions.
- Showback/Chargeback: Attribute cloud costs to the teams that generate them, creating natural incentives for efficiency.
- Spot Fleet with Fallback: Run workloads on spot instances with automatic fallback to on-demand when spot capacity is unavailable.
- Reserved Instance Portfolio: Maintain a mix of 1-year and 3-year reservations across instance families to balance commitment risk with discount depth.
Anti-Patterns
- Optimizing only at the infrastructure level while ignoring application efficiency. A poorly written query can cost more than an oversized instance.
- Buying reserved instances without understanding actual usage patterns. Unused reservations are wasted money.
- Treating all environments equally. Production needs redundancy and performance; development does not.
- Ignoring data transfer costs. Cross-region and internet egress charges can be surprisingly large.
- Over-optimizing to the point of fragility. Extreme cost cutting that eliminates redundancy or monitoring creates incident risk that costs more than the savings.
- Not accounting for the engineering time spent on optimization. If an engineer spends a week saving ten dollars per month, the ROI is negative.
Install this skill directly: skilldb add devops-cloud-skills
Related Skills
Incident Management
Coordinate effective incident response from detection through resolution and post-mortem. Trigger keywords: incident management, incident response, on-call, postmortem, blameless, severity levels, war room, MTTR.
Infrastructure As Code
Provision and manage cloud infrastructure through code rather than manual configuration. Covers Terraform, Pulumi, CloudFormation, and IaC best practices. Trigger keywords: IaC, Terraform, infrastructure as code, CloudFormation, Pulumi, provisioning, state management.
Monitoring Observability
Build observability systems using metrics, logs, and traces to understand system behavior and diagnose issues. Trigger keywords: monitoring, observability, metrics, logging, tracing, Prometheus, Grafana, Datadog, alerting, SLO, SLI.
Security Devops
Integrate security practices into DevOps workflows and CI/CD pipelines. Covers shift-left security, vulnerability scanning, and secure development lifecycle. Trigger keywords: DevSecOps, security automation, vulnerability scanning, SAST, DAST, supply chain security, shift-left.
Service Mesh
Implement service mesh infrastructure for managing microservice communication, observability, and security. Trigger keywords: service mesh, Istio, Linkerd, Envoy, sidecar proxy, mTLS, traffic management, circuit breaker.
Web Infrastructure Basics
Understand DNS, domain management, CDNs, SSL/TLS, load balancing, and web hosting fundamentals. Use this skill when the user asks about setting up a domain, configuring DNS records, understanding how websites are served, choosing hosting, setting up HTTPS, or troubleshooting domain and DNS issues.