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
asked 6 months ago412 views
2 Answers
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
answered 6 months ago
profile picture
EXPERT
reviewed a month ago
0
Accepted Answer

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
EXPERT
Kallu
answered 6 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions