$npx -y skills add giuseppe-trisciuoglio/developer-kit --skill aws-cost-optimizationProvides structured AWS cost optimization guidance using five pillars (right-sizing, elasticity, pricing models, storage optimization, monitoring) and twelve actionable best practices with executable AWS CLI examples. Use when optimizing AWS costs, reviewing AWS spending, finding
| 1 | # AWS Cost Optimization |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Guide a structured AWS cost review covering right-sizing, elasticity, pricing models, storage optimization, and continuous monitoring. References AWS native tools (Cost Explorer, Budgets, Compute Optimizer, Trusted Advisor, Cost Anomaly Detection) and delivers twelve prioritized best practices organized under five optimization pillars. All examples use the AWS CLI. |
| 6 | |
| 7 | ## When to Use |
| 8 | |
| 9 | - Optimizing AWS costs or reviewing AWS spending |
| 10 | - Finding unused or under-utilized AWS resources |
| 11 | - Implementing FinOps practices for cloud cost governance |
| 12 | - Reducing EC2, EBS, S3, or load balancer bills |
| 13 | - Choosing between On-Demand, Spot, Reserved Instances, and Savings Plans |
| 14 | - Configuring AWS Budgets, Cost Explorer, or Cost Anomaly Detection |
| 15 | - Performing an AWS Well-Architected Framework cost pillar review |
| 16 | - Cleaning up orphaned EBS snapshots or unused volumes |
| 17 | - Automating start/stop schedules for non-production workloads |
| 18 | |
| 19 | Trigger: "Optimize my AWS costs", "Review AWS spending", "Find unused AWS resources", "Help me with FinOps", "Reduce my EC2 bill", "Clean up unused EBS volumes", "Set up AWS Budgets" |
| 20 | |
| 21 | ## Instructions |
| 22 | |
| 23 | ### Five Optimization Pillars |
| 24 | |
| 25 | Work through each pillar in order during a cost review. |
| 26 | |
| 27 | #### Pillar 1 — Right-Size |
| 28 | |
| 29 | Match provisioned resources to actual workload needs. |
| 30 | |
| 31 | 1. Pull 14-day average CPU/memory metrics from CloudWatch for every EC2 instance |
| 32 | 2. Cross-reference with AWS Compute Optimizer recommendations |
| 33 | 3. Flag instances where peak utilization stays below 40% |
| 34 | 4. Recommend downsizing to the next smaller instance family/size |
| 35 | 5. For RDS, check read/write IOPS vs. provisioned capacity |
| 36 | |
| 37 | #### Pillar 2 — Increase Elasticity |
| 38 | |
| 39 | Schedule instance stop/start and leverage Auto Scaling Groups. |
| 40 | |
| 41 | 1. Identify non-production instances running 24/7 (dev, staging, QA) |
| 42 | 2. Propose stop/start schedules using AWS Instance Scheduler or EventBridge rules |
| 43 | 3. Review Auto Scaling Group policies for over-provisioned min/desired counts |
| 44 | 4. Recommend target-tracking scaling policies tied to actual demand metrics |
| 45 | 5. Consider Lambda or Fargate for bursty, event-driven workloads |
| 46 | |
| 47 | #### Pillar 3 — Leverage the Right Pricing Model |
| 48 | |
| 49 | Choose the optimal mix of On-Demand, Spot, Reserved Instances, and Savings Plans. |
| 50 | |
| 51 | 1. Analyze steady-state baseline using Cost Explorer RI Coverage and Savings Plans Coverage reports |
| 52 | 2. Recommend Compute Savings Plans for consistent baseline compute |
| 53 | 3. Suggest Spot Instances for fault-tolerant, stateless workloads (batch, CI/CD runners) |
| 54 | 4. Evaluate existing Reserved Instances for utilization; resell unused RIs on the RI Marketplace |
| 55 | 5. Use the AWS Pricing Calculator to model total cost under each pricing option |
| 56 | |
| 57 | #### Pillar 4 — Optimize Storage |
| 58 | |
| 59 | Eliminate waste in EBS, S3, and snapshots. |
| 60 | |
| 61 | 1. List unattached EBS volumes (`available` state) and recommend deletion after backup review |
| 62 | 2. Identify orphaned EBS snapshots no longer linked to an active AMI or volume |
| 63 | 3. Review S3 bucket metrics; recommend Intelligent-Tiering or lifecycle rules for infrequent access data |
| 64 | 4. Enable Amazon Data Lifecycle Manager (DLM) for automated snapshot retention |
| 65 | 5. Check for gp2 volumes that should be migrated to gp3 for cost and performance gains |
| 66 | |
| 67 | #### Pillar 5 — Measure, Monitor, and Improve |
| 68 | |
| 69 | Establish continuous cost governance. |
| 70 | |
| 71 | 1. Implement a cost allocation tagging strategy (e.g., `Environment`, `Team`, `Project`, `CostCenter`) |
| 72 | 2. Configure AWS Budgets with threshold alerts (50%, 80%, 100%, forecasted) |
| 73 | 3. Enable AWS Cost Anomaly Detection for automatic spend anomaly alerts |
| 74 | 4. Set up a monthly Cost Explorer saved report for leadership review |
| 75 | 5. Create a Trusted Advisor check schedule for cost optimization recommendations |
| 76 | |
| 77 | ### Review Process |
| 78 | |
| 79 | Follow this structured flow when the user asks for a cost review: |
| 80 | |
| 81 | 1. **Scope** — Ask which AWS accounts, regions, and services to review |
| 82 | 2. **Data Gathering** — Pull Cost Explorer data for the last 30–90 days; identify top-5 cost drivers |
| 83 | 3. **Pillar Walk-Through** — Evaluate each of the five pillars in order |
| 84 | 4. **Checklist** — Present the twelve best practices as a scored checklist (done / not done / partial) |
| 85 | 5. **Quick Wins** — Highlight the three highest-impact, lowest-effort actions |
| 86 | 6. **Roadmap** — Propose a 30/60/90-day optimization plan with estimated savings |
| 87 | |
| 88 | ## Examples |
| 89 | |
| 90 | ### Example 1 — List Unattached EBS Volumes |
| 91 | |
| 92 | User: "Find unused EBS volumes in my account." |
| 93 | |
| 94 | CLI commands to include in the response: |
| 95 | |
| 96 | ```bash |
| 97 | # List all EBS volumes in avail |