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

2026-11-03来源 dev.to AWSEnglish

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() 

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.

原文:https://www.a8q9.cn/en/article/aws-finops-field-notes-2026-11-03-automating-orphaned-ebs-storage-cleanup-47652e.html

相关文章