Optimize cloud infrastructure costs through resource rightsizing, reserved instances, spot instances, and waste reduction strategies.
Reduce infrastructure costs through intelligent resource allocation, reserved instances, spot instances, and continuous optimization without sacrificing performance.
Minimal working example:
# cost-optimization-setup.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: cost-optimization-scripts
namespace: operations
data:
analyze-costs.sh: |
#!/bin/bash
set -euo pipefail
echo "=== AWS Cost Analysis ==="
# Get daily cost trend
echo "Daily costs for last 7 days:"
aws ce get-cost-and-usage \
--time-period Start=$(date -d '7 days ago' +%Y-%m-%d),End=$(date +%Y-%m-%d) \
--granularity DAILY \
--metrics "BlendedCost" \
--group-by Type=DIMENSION,Key=SERVICE \
--query 'ResultsByTime[*].[TimePeriod.Start,Total.BlendedCost.Amount]' \
--output table
# Find unattached resources
echo -e "\n=== Unattached EBS Volumes ==="
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | AWS Cost Optimization Configuration | AWS Cost Optimization Configuration | | Kubernetes Cost Optimization | Kubernetes Cost Optimization | | Cost Monitoring Dashboard | Cost Monitoring Dashboard |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/infrastructure-cost-optimization · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/infrastructure-cost-optimization"
cp -r "skills/infrastructure-cost-optimization" ".claude/skills/infrastructure-cost-optimization"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.