I'm using the EC2 boto3 client to list volumes and get the total size. I need a way to get the total size in a certain point in time. For example total size of 2022-01-01.
My actual code looks like:
client = get_client('ec2',account=account)
excluded_tags = []
total_size = 0
unfiltered_volumes = client.describe_volumes()['Volumes']
filtered_volumes = filter_volumes(unfiltered_volumes, excluded_tags)
for filtered_volume in filtered_volumes:
for volume_id in filtered_volume:
total_size += filtered_volume[volume_id]