PHASE 03 // IMPLEMENT

recfo@implement:~/runbooks/s5-08
S5-08 · Optimize Usage & Cost · Usage Optimization

Deploy Automated Remediation

Why

Automated enforcement catches waste on day one. Enforced auto-shutdown of non-production environments is more effective than voluntary compliance. Policies that prevent waste at provisioning are cheaper than recommendations that fix it after the fact.

What

Deploy automations for common optimisation actions that don’t require human judgment — scheduled shutdown of non-prod, cleanup of unattached resources, and policy-based prevention.

How

Implement Non-Prod Shutdown Schedules

ProviderToolMechanism
AWSInstance Scheduler or EventBridge+LambdaStop tagged instances at 19:00, start at 07:00 weekdays
AzureStart/Stop VMs (Azure Automation)Runbook targets auto-shutdown: true tagged VMs
GCPCloud Scheduler + Cloud FunctionsFunction stops/starts labelled instances on schedule

Target: all dev and sbx environments by default. stg opt-in. prod never auto-stopped. Expected savings: ~65% on non-prod compute.

Automate Cleanup of Unattached Resources

Resource TypeDetectionAction
Unattached EBS volumesAWS Config rule / CUR queryAlert → 7 days → snapshot → delete
Unattached Azure disksAzure Policy / Resource GraphAlert → 7 days → snapshot → delete
Old snapshots (>90 days)Age-based query per providerAlert → owner review → delete
Idle load balancersZero target count for >7 daysAlert → owner review → delete

Deploy Prevention Policies

PolicyEffect
Deny unapproved instance typesPrevents expensive GPU instances in dev
Require auto-shutdown tag on non-prodEnsures scheduling eligibility
Block public storage bucketsPrevents accidental data exposure + egress costs

Deliverable Checklist

  • Non-prod shutdown schedules deployed (all providers)
  • Unattached resource cleanup automation active
  • Old snapshot cleanup automation active
  • Prevention policies deployed (instance types, storage access)
  • Savings from automation tracked monthly