Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Skew script to find all unattached EBS volumes
import skew
total_size = 0
total_volumes = 0
for volume in skew.scan('arn:aws:ec2:*:*:volume/*'):
if not['Attachments']:
total_volumes += 1
total_size +=['Size']
print('%s: %dGB' % (volume.arn,['Size']))
print('Total unattached volumes: %d' % total_volumes)
print('Total size (GB): %d' % total_size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment