Skill

Optimize Cloud Spending Across AWS, Azure, and GCP

Systematic cloud cost optimization strategies across AWS, Azure, and GCP - right-sizing, pricing models, tagging, and budget alerts with Terraform examples.

Works with awsazuregcp

73
Spark score
out of 100
Updated 9 days ago
Version 15.7.0

Add to Favorites

Why it matters

Systematically reduce cloud expenditure by implementing cost optimization strategies across AWS, Azure, and GCP, ensuring performance and reliability are maintained.

Outcomes

What it gets done

01

Analyze resource utilization and right-size instances.

02

Implement cost allocation tags and budget alerts.

03

Leverage pricing models like reserved instances and savings plans.

04

Optimize storage tiers and data transfer costs.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-cost-optimization | bash

Overview

Cloud Cost Optimization

A cloud cost optimization skill covering pricing models, right-sizing, tagging, storage lifecycle, and budget governance across AWS, Azure, and GCP. Use for reducing cloud spend, right-sizing, cost governance, or multi-cloud cost optimization.

What it does

This skill implements systematic cost optimization strategies to reduce cloud spending across AWS, Azure, and GCP while maintaining performance and reliability, following a four-part framework: visibility (cost allocation tags, cloud cost management tools, budget alerts, cost dashboards), right-sizing (analyzing utilization, downsizing over-provisioned resources, auto-scaling, removing idle resources), pricing models (reserved capacity, spot/preemptible instances, savings plans, committed use discounts), and architecture optimization (managed services, caching, data transfer optimization, lifecycle policies).

For AWS, it covers Reserved Instances (30-72% savings vs on-demand over 1-3 year terms with standard or convertible flexibility), Savings Plans (up to 66-72% savings across EC2/Fargate/Lambda, flexible across instance families/regions/OS), Spot Instances (up to 90% savings for batch/CI/CD/stateless workloads, with a 2-minute interruption notice, best mixed with on-demand for resilience), and S3 lifecycle configuration transitioning objects to cheaper storage classes over time and expiring old data. For Azure, it covers Reserved VM Instances (up to 72% savings, exchangeable), Azure Hybrid Benefit (reusing existing Windows Server/SQL Server licenses for up to 80% savings with RIs), and Azure Advisor recommendations (right-sizing, deleting unused resources, reserved capacity, storage optimization). For GCP, it covers Committed Use Discounts (up to 57% savings on vCPUs/memory), Sustained Use Discounts (automatic, up to 30%, no commitment, for Compute Engine/GKE), and Preemptible VMs (up to 80% savings, 24-hour max runtime, best for batch workloads).

It provides a Terraform-based tagging strategy applying common tags (Environment, Project, CostCenter, Owner, ManagedBy) merged onto resources for cost allocation, and cost monitoring via an AWS Budget resource with a percentage-threshold notification, plus cost anomaly detection tools per provider (AWS Cost Anomaly Detection, Azure Cost Management alerts, GCP Budget alerts).

Its architecture patterns: serverless-first (Lambda/Functions for event-driven workloads, pay only for execution time, no idle costs); right-sized databases per environment (small instances in dev, larger with read replicas in production); multi-tier storage (hot in S3 Standard, warm in Standard-IA after 30 days, cold in Glacier after 90 days, archive in Deep Archive after 365 days); and auto-scaling via a Terraform scaling policy tied to a CloudWatch CPU-utilization alarm.

Its 15-item cost optimization checklist covers tagging, deleting unused resources (EBS, EIPs, snapshots), right-sizing, reserved capacity, auto-scaling, storage class optimization, lifecycle policies, anomaly detection, budget alerts, weekly cost review, spot/preemptible usage, data transfer optimization, caching, managed services, and continuous monitoring. Tools referenced: AWS Cost Explorer/Cost Anomaly Detection/Compute Optimizer, Azure Cost Management/Advisor, GCP Cost Management/Recommender, and multi-cloud tools CloudHealth, Cloudability, and Kubecost.

resource "aws_s3_bucket_lifecycle_configuration" "example" {
  bucket = aws_s3_bucket.example.id

  rule {
    id     = "transition-to-ia"
    status = "Enabled"

    transition {
      days          = 30
      storage_class = "STANDARD_IA"
    }

    transition {
      days          = 90
      storage_class = "GLACIER"
    }

    expiration {
      days = 365
    }
  }
}

When to use - and when NOT to

Use this skill when reducing cloud spending, right-sizing resources, implementing cost governance, optimizing multi-cloud costs, or meeting budget constraints.

Not for tasks unrelated to cloud cost optimization, or where a different domain or tool is needed. Related skills: terraform-module-library for resource provisioning, multi-cloud-architecture for cloud selection.

Inputs and outputs

Inputs: a cloud environment (AWS, Azure, and/or GCP) and its current spending/utilization data.

Outputs: applied pricing-model optimizations (reserved/spot/committed-use), right-sized resources, storage lifecycle policies, tagging for cost allocation, budget alerts and anomaly detection, and a completed cost optimization checklist.

Integrations

AWS Cost Explorer, Cost Anomaly Detection, Compute Optimizer; Azure Cost Management, Advisor; GCP Cost Management, Recommender; CloudHealth, Cloudability, Kubecost; Terraform.

Who it's for

Cloud engineers and FinOps teams reducing AWS/Azure/GCP spend through right-sizing, pricing-model selection, tagging, and lifecycle/budget governance.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.