Get EBS Volume total size in a certain point in time using Boto3?

Viewed 30

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]

1 Answers

There is no way to retrieve values from EBS client on a certain period of time

Related