From aws-toolkit
Analyzes AWS costs via Cost Explorer and recommends optimizations: EC2 right-sizing/Reserved Instances, S3 lifecycles, RDS adjustments, resource cleanup. Use for reducing cloud bills.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aws-toolkit:aws-cost-optimizerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze and optimize AWS costs with actionable recommendations.
Analyze and optimize AWS costs with actionable recommendations.
Review Cost Explorer, identify top costs, right-size instances, use Reserved Instances, delete unused resources.
Access Cost Explorer:
Key metrics to check:
Right-sizing instances:
Check utilization:
# Get CloudWatch metrics
aws cloudwatch get-metric-statistics \
--namespace AWS/EC2 \
--metric-name CPUUtilization \
--dimensions Name=InstanceId,Value=i-1234567890abcdef0 \
--start-time 2024-01-01T00:00:00Z \
--end-time 2024-01-31T23:59:59Z \
--period 3600 \
--statistics Average
Recommendations:
Reserved Instances:
Savings Plans:
Spot Instances:
Stop unused instances:
# Find stopped instances
aws ec2 describe-instances \
--filters "Name=instance-state-name,Values=stopped" \
--query 'Reservations[].Instances[].[InstanceId,Tags[?Key==`Name`].Value|[0]]'
# Terminate if not needed
aws ec2 terminate-instances --instance-ids i-1234567890abcdef0
Lifecycle policies:
{
"Rules": [{
"Id": "Archive old data",
"Status": "Enabled",
"Transitions": [
{
"Days": 30,
"StorageClass": "STANDARD_IA"
},
{
"Days": 90,
"StorageClass": "GLACIER"
}
],
"Expiration": {
"Days": 365
}
}]
}
Storage classes:
Delete incomplete multipart uploads:
aws s3api list-multipart-uploads --bucket my-bucket
# Set lifecycle rule to abort after 7 days
Analyze storage:
# Get bucket size
aws s3 ls s3://my-bucket --recursive --summarize
Right-size databases:
Reserved Instances:
Stop dev/test databases:
# Stop RDS instance
aws rds stop-db-instance --db-instance-identifier mydb
# Start when needed
aws rds start-db-instance --db-instance-identifier mydb
Delete old snapshots:
# List snapshots
aws rds describe-db-snapshots --query 'DBSnapshots[?SnapshotCreateTime<`2023-01-01`]'
# Delete old snapshots
aws rds delete-db-snapshot --db-snapshot-identifier snapshot-id
Reduce data transfer:
VPC endpoints:
# Create S3 VPC endpoint (no data transfer charges)
aws ec2 create-vpc-endpoint \
--vpc-id vpc-12345678 \
--service-name com.amazonaws.us-east-1.s3 \
--route-table-ids rtb-12345678
Delete unattached volumes:
# Find unattached volumes
aws ec2 describe-volumes \
--filters "Name=status,Values=available" \
--query 'Volumes[].[VolumeId,Size,VolumeType]'
# Delete if not needed
aws ec2 delete-volume --volume-id vol-1234567890abcdef0
Delete old snapshots:
# List old snapshots
aws ec2 describe-snapshots --owner-ids self \
--query 'Snapshots[?StartTime<`2023-01-01`]'
# Delete
aws ec2 delete-snapshot --snapshot-id snap-1234567890abcdef0
Use gp3 instead of gp2:
Optimize memory allocation:
Reduce cold starts:
Monitor invocations:
# Get Lambda metrics
aws cloudwatch get-metric-statistics \
--namespace AWS/Lambda \
--metric-name Invocations \
--dimensions Name=FunctionName,Value=my-function \
--start-time 2024-01-01T00:00:00Z \
--end-time 2024-01-31T23:59:59Z \
--period 86400 \
--statistics Sum
Reduce log retention:
# Set log retention to 7 days
aws logs put-retention-policy \
--log-group-name /aws/lambda/my-function \
--retention-in-days 7
Delete unused log groups:
# List log groups
aws logs describe-log-groups
# Delete
aws logs delete-log-group --log-group-name /aws/lambda/old-function
Find unused resources:
Elastic IPs not attached:
aws ec2 describe-addresses \
--query 'Addresses[?AssociationId==null]'
Load balancers with no targets:
aws elbv2 describe-load-balancers
aws elbv2 describe-target-health --target-group-arn arn
NAT Gateways with low traffic:
# Check CloudWatch metrics for BytesOutToDestination
Compute:
Storage:
Database:
Networking:
Monitoring:
General:
Reserved Instances:
Spot Instances:
S3 Lifecycle:
Right-sizing:
AWS Cost Explorer:
AWS Budgets:
# Create budget
aws budgets create-budget \
--account-id 123456789012 \
--budget file://budget.json
AWS Trusted Advisor:
Third-party tools:
Tagging strategy:
Regular reviews:
Automation:
Monitoring:
npx claudepluginhub p/armanzeroeight-aws-toolkit-plugins-aws-toolkitAnalyzes AWS spending patterns and provides cost optimization recommendations. Detects idle EC2, unattached EBS volumes, unused Elastic IPs, and suggests rightsizing.
Provides structured AWS cost optimization via five pillars (right-sizing, elasticity, pricing, storage, monitoring) and 12 best practices with AWS CLI examples. For reviewing spending, unused resources, FinOps.
Analyzes and optimizes AWS costs by identifying top cost drivers and proposing savings opportunities ranked by effort.