
AWS Cost Optimizer
FreeOptimize your AWS spending with actionable insights.
Free · Opens the source repo
What AWS Cost Optimizer does
The AWS Cost Optimizer skill provides a comprehensive toolkit for analyzing and reducing your AWS cloud costs. By leveraging the AWS CLI and Cost Explorer, this skill enables users to gain insights into their spending patterns, identify wasteful resources, and implement strategies for cost reduction. It is particularly useful for cloud architects, DevOps engineers, and financial analysts who need to manage AWS expenses effectively.
With capabilities such as cost analysis, resource optimization, and savings recommendations, users can break down their AWS costs by service, region, and resource tags. The skill identifies idle EC2 instances, unattached EBS volumes, and other underutilized resources, presenting a clear picture of where savings can be made. Additionally, it provides recommendations for rightsizing instances and suggests opportunities for Reserved Instances or Savings Plans based on usage metrics.
The skill guides users through a structured optimization workflow, starting with a baseline assessment of costs and moving through quick wins and strategic optimizations. It emphasizes ongoing monitoring and best practices to ensure that cloud costs remain manageable over time. By automating the analysis and reporting processes, users can focus on implementing the recommendations rather than spending time on manual data collection.
Overall, the AWS Cost Optimizer skill is an essential tool for anyone looking to enhance their AWS cost management practices, making it easier to identify and act on cost-saving opportunities.
When to use it
Use this skill when you need to conduct a thorough analysis of your AWS spending and seek actionable recommendations for cost savings.
When not to use it
This skill is not suitable for environments where AWS resources are not being actively monitored or managed, as it requires data from AWS Cost Explorer and CLI commands.
What you can build with it
Monthly Cost Review
Use the skill to generate a report on AWS spending for the previous month, identifying any unexpected increases.
Resource Cleanup
Quickly find and delete unattached EBS volumes and unused Elastic IPs to reduce unnecessary costs.
Rightsizing Instances
Analyze EC2 instance utilization and receive recommendations for rightsizing to optimize performance and costs.
How to install AWS Cost Optimizer
View source1. Install with the skills CLI
npx skills add sickn33/agentic-awesome-skills/aws-cost-optimizer --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by sickn33AWS 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
-
Baseline Assessment
- Pull 3-6 months of cost data
- Identify top 5 spending services
- Calculate growth rate
-
Quick Wins
- Delete unattached EBS volumes
- Release unused Elastic IPs
- Stop/terminate idle EC2 instances
- Delete old snapshots
-
Strategic Optimization
- Analyze Reserved Instance coverage
- Review instance types vs. workload
- Implement S3 lifecycle policies
- Consider Spot instances for non-critical workloads
-
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
- "Create a script to delete unattached volumes"
- "Set up a budget alert for $1000/month"
- "Generate a cost optimization report for leadership"
Best Practices
- Always test in non-production first
- Verify resources are truly unused before deletion
- Document all cost optimization actions
- Calculate ROI for optimization efforts
- Automate recurring optimization tasks
- Use AWS Trusted Advisor recommendations
- Enable AWS Cost Anomaly Detection
Integration with Kiro CLI
This skill works seamlessly with Kiro CLI's AWS integration:
# Use Kiro to analyze costs
kiro-cli chat "Use aws-cost-optimizer to analyze my spending"
# Generate optimization report
kiro-cli chat "Create a cost optimization plan using aws-cost-optimizer"
Safety Notes
- Risk Level: Low - Read-only analysis is safe
- Deletion Actions: Medium Risk - Always verify before deleting resources
- Production Changes: High Risk - Test rightsizing in dev/staging first
- Maintain backups before any deletion
- Use
--dry-runflag when available
Additional Resources
- AWS Cost Optimization Best Practices
- AWS Well-Architected Framework - Cost Optimization
- AWS Cost Explorer API
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Frequently asked questions about AWS Cost Optimizer
Similar skills
Initiating Coverage
Create institutional-quality equity research reports.
Financial Tear Sheet Generator
Create professional company profiles with live data.
Pitch Deck Population
Effortlessly fill pitch deck templates with data.
Tax Season Organizer
Streamline your tax prep for accountants.
Month End Prep
Streamline your month-end close process with ease.
Funding Digest
Summarize funding rounds in a single slide.
