I am fairly new with AWS(just have a free AWS EC2 instance to test out AWS stuff) so the question might sound silly.
Today I got a mail that my Amazon Elastic Block Storeage has reached 85% usage on my free AWS account which is about 25 GB of the allocated 30 GB. From what I read today, Amazon EBS is a persistent store used for EC2 instances.
However I can see in my EC2 instance that df -h just show 2 GB usage and available disk as 28 GB as this is just my practice instance.
Am I missing some important piece of information here?
An instance store provides temporary block-level storage for your instance. This storage is located on disks that are physically attached to the host computer.
The instance store is ideal for temporary storage, because the data stored in instance store volumes is not persistent through instance stops, terminations, or hardware failures. For data you want to retain longer, or if you want to encrypt the data, use Amazon Elastic Block Store (Amazon EBS) volumes instead.
Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS volumes behave like raw, unformatted block devices. You can mount these volumes as devices on your instances.
Amazon Elastic Block Store (Amazon EBS) is an easy-to-use, scalable, high-performance block-storage service designed for Amazon Elastic Compute Cloud (Amazon EC2).
EBS devices are block devices.
This means the service does not know how much data you actually store on them -- it only knows how much storage space you allocated. So, the results of df -h
don't matter. The actual size of the volume is all that matters -- that's the basis for billing. The rest of the space (that space you aren't current using) is still storing something, even it if's just 0's, but the service is unaware of what you've stored. (Other storage services like S3 and EFS bill for actual data stored, because they are not block storage services.)
Now, the free tier allows 30 gigabyte-months of EBS volume usage. You can use more than that, but this is the limit that's provided for free. You'll be billed for any more than this.
A gigabyte-month means 1 gigabyte of block storage space, allocated for 1 month, regardless of how you use it.
Also, 2 gigabytes of allocated storage for 15 days is 1 GB-month.
Also, 10 gigabytes of allocated storage for 3 days is 1 GB-month.
...etc.
The free tier, then, would allow you to have a 30 GB volume for 30 days, or a 60 GB volume for 15 days, or even a 900 GB volume... but you could have it for only 1 day. But to avoid continuing charges, such a volume must be deleted -- not just the files on the volume.
The warning message was correct. If you have a 30 GB volume in place for 26 days, then you have used 26 GB-months of storage, which is 86.7% of the free tier limit of 30 GB-months.
For anyone stumbling upon this in 2021:
Free Trial provides 750 Hrs of Amazon EC2 Linux t2.micro and 750 Hrs of Amazon EC2 Windows t2.micro per month. However, both of them will add in to the free 30GB EBS pool. So make sure the memories allotted to both the VMs sum up to 30 GB or less.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With