Skip to content
Skillpedia
Tasks & projects48k · #2243

aws-cost-optimizer

Helps your agent analyze and optimize AWS costs. It uses tools like Cost Explorer to find ways to save money in the cloud.

What it does

This tool helps you understand and reduce your spending on Amazon Web Services (AWS). It analyzes your usage, finds waste, and suggests ways to save money.

When to use it

  • ✓When you want to know where your AWS money is going.
  • ✓If you suspect you're overspending on AWS and want to cut costs.
  • ✓To find cloud resources that aren't being used and can be turned off.

Example of what to ask your AI

“What AWS resources am I not using that I can turn off to save money?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/aws-cost-optimizer/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/aws-cost-optimizer/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool uses special commands (AWS CLI) to gather information about your AWS spending and resources. It then analyzes this data to find cost-saving opportunities.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill aws-cost-optimizer

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/aws-cost-optimizer/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

AWS Cost Optimizer

Analyze AWS spending patterns, identify waste, and provide actionable cost reduction strategies.

When to Use This Skill

Use this skill when you need to analyze AWS spending, identify cost optimization opportunities, or reduce cloud waste.

Core Capabilities

Cost Analysis

  • Parse AWS Cost Explorer data for trends and anomalies
  • Break down costs by service, region, and resource tags
  • Identify month-over-month spending increases

Resource Optimization

  • Detect idle EC2 instances (low CPU utilization)
  • Find unattached EBS volumes and old snapshots
  • Identify unused Elastic IPs
  • Locate underutilized RDS instances
  • Find old S3 objects eligible for lifecycle policies

Savings Recommendations

  • Suggest Reserved Instance/Savings Plans opportunities
  • Recommend instance rightsizing based on CloudWatch metrics
  • Identify resources in expensive regions
  • Calculate potential savings with specific actions

AWS CLI Commands

Get Cost and Usage

# Last 30 days cost by service
aws ce get-cost-and-usage \
  --time-period Start=$(date -d '30 days ago' +%Y-%m-%d),End=$(date +%Y-%m-%d) \
  --granularity MONTHLY \
  --metrics BlendedCost \
  --group-by Type=DIMENSION,Key=SERVICE

# Daily costs for current month
aws ce get-cost-and-usage \
  --time-period Start=$(date +%Y-%m-01),End=$(date +%Y-%m-%d) \
  --granularity DAILY \
  --metrics UnblendedCost

Find Unused Resources

# Unattached EBS volumes
aws ec2 describe-volumes \
  --filters Name=status,Values=available \
  --query 'Volumes[*].[VolumeId,Size,VolumeType,CreateTime]' \
  --output table

# Unused Elastic IPs
aws ec2 describe-addresses \
  --query 'Addresses[?AssociationId==null].[PublicIp,AllocationId]' \
  --output table

# Idle EC2 instances (requires CloudWatch)
aws cloudwatch get-metric-statistics \
  --namespace AWS/EC2 \
  --metric-name CPUUtilization \
  --dimensions Name=InstanceId,Value=i-xxxxx \
  --start-time $(date -u -d '7 days ago' +%Y-%m-%dT%H:%M:%S) \
  --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
  --period 86400 \
  --statistics Average

# Old EBS snapshots (>90 days)
aws ec2 describe-snapshots \
  --owner-ids self \
  --query 'Snapshots[?StartTime<=`'$(date -d '90 days ago' --iso-8601)'`].[SnapshotId,StartTime,VolumeSize]' \
  --output table

Rightsizing Analysis

# List EC2 instances with their types
aws ec2 describe-instances \
  --query 'Reservations[*].Instances[*].[InstanceId,InstanceType,State.Name,Tags[?Key==`Name`].Value|[0]]' \
  --output table

# Get RDS instance utilization
aws cloudwatch get-metric-statistics \
  --namespace AWS/RDS \
  --metric-name CPUUtilization \
  --dimensions Name=DBInstanceIdentifier,Value=mydb \
  --start-time $(date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%S) \
  --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
  --period 86400 \
  --statistics Average,Maximum

Optimization Workflow

  1. Baseline Assessment

    • Pull 3-6 months of cost data
    • Identify top 5 spending services
    • Calculate growth rate
  2. Quick Wins

    • Delete unattached EBS volumes
    • Release unused Elastic IPs
    • Stop/terminate idle EC2 instances
    • Delete old snapshots
  3. Strategic Optimization

    • Analyze Reserved Instance coverage
    • Review instance types vs. workload
    • Implement S3 lifecycle policies
    • Consider Spot instances for non-critical workloads
  4. Ongoing Monitoring

    • Set up AWS Budgets with alerts
    • Enable Cost Anomaly Detection
    • Tag resources for cost allocation
    • Monthly cost review meetings

Cost Optimization Checklist

  • Enable AWS Cost Explorer
  • Set up cost allocation tags
  • Create AWS Budget with alerts
  • Review and delete unused resources
  • Analyze Reserved Instance opportunities
  • Implement S3 Intelligent-Tiering
  • Review data transfer costs
  • Optimize Lambda memory allocation
  • Use CloudWatch Logs retention policies
  • Consider multi-region cost differences

Example Prompts

Analysis

  • "Show me AWS costs for the last 3 months broken down by service"
  • "What are my top 10 most expensive resources?"
  • "Compare this month's spending to last month"

Optimization

  • "Find all unattached EBS volumes and calculate savings"
  • "Identify EC2 instances with <5% CPU utilization"
  • "Suggest Reserved Instance purchases based on usage"
  • "Calculate savings from deleting snapshots older than 90 days"

Implementation

…

FAQ

What are 'idle EC2 instances'?

These are virtual computers on AWS that are running but not doing much work. Shutting them down can save money.

What are 'unattached EBS volumes'?

These are storage disks on AWS that were created but are not connected to any virtual computer. They take up space and incur costs without being useful.

What are 'Savings Plans'?

These are commitments to use AWS resources for a period in exchange for discounts. The tool can help identify if they are worthwhile for you.

Details

Original description by the author

Comprehensive AWS cost analysis and optimization recommendations using AWS CLI and Cost Explorer

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#2243
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills