DEV Community

Ace7-coder
Ace7-coder

Posted on

AWS FinOps Field Notes (2026-11-03): Automating Orphaned EBS & Storage Cleanup

While auditing cloud infrastructure costs this week, recurring configuration gaps continue to quietly inflate monthly cloud bills.

Field Insight: The Hidden Cost Trap

Fifty abandoned 100 GB unattached EBS volumes cost $500/month ($6,000/year). Without automated cross-account visibility, volumes left behind by terminated instances quietly accumulate billing.

Automated Detection: Auditing Detached EBS Volumes with Boto3

import boto3

def audit_unattached_ebs(region='us-east-1'):
    ec2 = boto3.client('ec2', region_name=region)
    volumes = ec2.describe_volumes(
        Filters=[{'Name': 'status', 'Values': ['available']}]
    ).get('Volumes', [])

    print(f"[{region}] Found {len(volumes)} unattached volume(s):")
    for vol in volumes:
        print(f" - {vol['VolumeId']} | {vol['Size']} GiB ({vol['VolumeType']})")
    return volumes

if __name__ == '__main__':
    audit_unattached_ebs()

Enter fullscreen mode Exit fullscreen mode

Running one-off audit scripts in single regions does not scale across enterprise AWS Organizations. Sustained cloud cost management requires cross-account role assumption (sts:AssumeRole), cost anomaly correlation, and automated scheduled auditing.

Top comments (0)