How can I view / access the volume of data written to an EBS volume over an interval?

0

I am attempting to estimate the volume / cost of my scheduled (monthly) EBS snapshot operations. The pricing calculator asks that I supply "amount changed per snapshot" (in GB). That is the number I am attempting to measure, presumably by accessing historical data in the change to my volume. Is there an API call that will give me the EBS volume delta for a given time frame? A CloudWatch metric? A script? To be clear, I am not attempting to measure the size of a snapshot once it has been taken, but to estimate the size (and thus the cost) of a future snapshot.

AWS
lovjim
preguntada hace un año643 visualizaciones
2 Respuestas
1

Amazon EBS snapshots are stored incrementally. When you take a new snapshot, only the blocks that you changed after your last snapshot are saved, and you're billed only for those changed blocks. For example, if you have a volume that's storing 100 GB of data, you are charged for the full 100 GB of data for the first snapshot. If you have 105 GB of data at the time of the next snapshot, then you are billed only for the additional 5 GB of snapshot storage with the second snapshot.

If you already have monthly snapshot - One way to see how much you're being charged for your snapshots is to look at your EC2 usage reports. The snapshot portion of usage reports are only updated once every 24 hours, so it's often easier to look at your previous month's usage to get an idea of how much you were charged compared to the amount of data you had in snapshots via this link: https://console.aws.amazon.com/billing/home?#/reports/usage

or you can go to Cost explorer - Filter Usage type -EBS:SnapshotUsage Here you can view the approximate cost change in snapshot

profile pictureAWS
respondido hace un año
profile picture
EXPERTO
revisado hace 6 meses
0
Respuesta aceptada

While Aneesh's answer is mostly true, this part is not as simple as it sounds

If you have 105 GB of data at the time of the next snapshot, then you are billed only for the additional 5 GB of snapshot storage with the second snapshot.

Above is true, only if you didn't change any of blocks in previously written 100GB. In real life your second snapshot can be anything betweet 5GB and 105GB. You don't even have to overwrite all of that original 100GB to get 105GB snapshot. It is enough if you made a single change in every block. This is also why measuring VolumeWriteBytes since last snapshot isn't going to be very good measure of snapshot size. I can write 100GB, but there is a big difference if that is creating new files totaling 100GB, or overwriting the same blocks 100 times.

But if you want to try, I think SUM() or RUNNING_SUM() of VolumeWriteBytes for given EBS volume is what you are looking for.

profile picture
EXPERTO
Kallu
respondido hace un año
profile picture
EXPERTO
revisado hace 6 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas