Execute use when you need to work with cloud cost optimization.
This skill provides cost analysis and optimization with comprehensive guidance and automation.
Trigger with phrases like "optimize costs", "analyze spending",
or "reduce costs".
Cleanup scripts for idle resources (with dry-run mode for safety)
Error Handling
Error
Cause
Solution
Access Denied on Cost Explorer API
Missing ce:* IAM permissions
Attach the AWSBillingReadOnlyAccess managed policy to the IAM user/role
No billing data available
Account is too new or cost export not enabled
Enable Cost Explorer (takes 24h to populate) or set up CUR (Cost and Usage Report)
Rightsizing recommendation breaks workload
Instance too small for peak load
Base sizing on P95 utilization, not average; keep a 20% headroom buffer
Spot instance terminated mid-job
Spot capacity reclaimed by provider
Use spot fleet with diversified instance types and implement checkpointing
Budget alert not firing
SNS topic or notification channel misconfigured
Verify SNS subscription is confirmed and test with a low threshold
Examples
"Analyze AWS costs for the last 3 months, identify the top waste areas, and generate a cleanup script for unattached EBS volumes and unused Elastic IPs."
"Compare on-demand EC2 spend against Savings Plans pricing and recommend 1-year commitments for steady-state workloads."
"Create S3 lifecycle policies to move objects older than 90 days to Glacier and delete after 365 days across all buckets tagged env:production."