When EC2 instances are terminated across large AWS fleets, associated EBS volumes often survive in an unattached available state if DeleteOnTermination was not explicitly configured on every block device. Left unmonitored, hundreds of orphaned gigabytes continue accruing charges month after month.
The Governance Problem: Why Scripts Fail Without Ownership
As cloud engineer Aman Maheshwari noted, in environments with hundreds of instances, automated scripts that blindly delete unattached volumes create operational risk:
Missing Context: A detached volume might contain critical database state, debugging dumps, or compliance archives waiting on sign-off.
The Solution: A two-tier governance model—generate automated reporting with resource owner tags, send notification digests (via SNS/Slack), and enforce a grace period before snapshotting and purging.
Auditing & Reporting Detached Volumes with Boto3
Here is an automated audit pattern using boto3 that queries unattached volumes, resolves owner tags, and…