# Check CPU utilizationclanker ask "Show me EC2 instances with low CPU usage over the last 7 days"# Example output:# prod-app-1 (c5.2xlarge): avg 12% CPU, max 23%# api-server (m5.xlarge): avg 8% CPU, max 15%
Downsize instances:
# Change instance typeclanker ask --maker "change prod-app-1 from c5.2xlarge to c5.xlarge"# The plan will:# 1. Stop the instance# 2. Modify instance type# 3. Start the instance# Review and applyclanker ask --apply < plan.json
clanker ask "Show me RDS instances with low CPU and connection count"# staging-db: db.t3.large, avg 5% CPU, max 3 connections# dev-db: db.t3.medium, avg 3% CPU, max 1 connection
Downsize RDS:
# Create snapshot first (safety)clanker ask --maker "create snapshot of staging-db"# Modify instance classclanker ask --maker "change staging-db from db.t3.large to db.t3.small"# Apply immediately or during maintenance windowclanker ask --apply < plan.json
# Check memory usageclanker ask "Show me Lambda functions with max memory usage vs. allocated"# Example:# image-processor: allocated 1024 MB, max used 567 MB# api-handler: allocated 512 MB, max used 128 MB
Right-size Lambda memory:
# Reduce memory (also reduces CPU)clanker ask --maker "change image-processor memory from 1024 MB to 768 MB"clanker ask --maker "change api-handler memory from 512 MB to 256 MB"clanker ask --apply < plan.json
Lambda pricing is based on GB-seconds. Reducing memory reduces cost, but may increase duration. Test to find the optimal balance.
# gp3 is 20% cheaper than gp2 with same performanceclanker ask "Show me gp2 EBS volumes"# Convert to gp3clanker ask --maker "convert all gp2 volumes to gp3"
# Find old snapshotsclanker ask "Show me EBS snapshots older than 90 days"# Delete (after verifying they're not needed)clanker ask --maker --destroyer "delete EBS snapshots older than 90 days for terminated instances"
# Find steady-state workloadsclanker ask "Show me EC2 instances running 24/7 for the last 30 days"# Check RDS uptimeclanker ask "Show me RDS instances with high uptime"
Reserved Instance savings:
On-Demand c5.xlarge: $0.17/hour1-year RI (no upfront): $0.112/hour (34% savings)3-year RI (all upfront): $0.091/hour (46% savings)For 3 instances running 24/7:On-Demand: $3,733/year1-year RI: $2,461/yearSavings: $1,272/year (34%)
Use AWS Cost Explorer RI recommendations or Compute Optimizer to identify the best RI purchases.
# Check pod resource usageclanker k8s stats pods -A --sort-by memory# Find pods using much less than requestedclanker k8s ask "show me pods using less than 50% of requested CPU or memory"
Adjust pod resources:
# Reduce requests and limitskubectl set resources deployment my-app \ --requests=cpu=100m,memory=256Mi \ --limits=cpu=500m,memory=512Mi# Or use VPA (Vertical Pod Autoscaler)kubectl apply -f - <<EOFapiVersion: autoscaling.k8s.io/v1kind: VerticalPodAutoscalermetadata: name: my-app-vpaspec: targetRef: apiVersion: apps/v1 kind: Deployment name: my-app updatePolicy: updateMode: "Auto"EOF
# Instead of serving from S3 directlyclanker ask --maker "create CloudFront distribution for S3 bucket my-assets"# Savings on data transfer:# S3: $0.09/GB# CloudFront: $0.085/GB (plus caching reduces origin requests)