Depending on the volume type, AWS EBS charges you based on storage, IO, and throughput provisioned. These costs can add up quickly, driven by factors including volume type, volume size, provisioned IOPS (gp3, io1/2), and provisioned throughput (gp3).
By retyping your AWS EBS volumes, you can control runaway costs and save up to 20% off your storage spend.
How to retype your EBS volumes
Unattached/phantom EBS volumes
For all auto scaling EC2 machines and one-off test instances, Delete Volumes on Termination should be enabled. For dedicated instances (app servers, dbs, web servers with custom configuration), if you need their data, use snapshots. All unattached volumes should be manually deleted. Gp3 volumes will cost 960$/TB/yr. For all non-HDD volumes (gp2/3, io1/2), snapshots are cheaper by over 40%.
Older/incorrect volume type
Use the latest volume types offered by AWS. They have similar or better price-to-performance than previous versions. Based on our calculations, the flowchart below is how they should be typed. If you have higher throughput requirements for gp3, provision them. It is cheaper (averaged over volume size per GB) to have provisioned throughput compared to the extra 125 MB/s you may get from gp2 post 334 GB volume size. Don’t use IO types for very low IO nos. Gp3 volumes offer similar or better performance than gp2 for 20% lower cost.
In the past, folks have had to provision excess volume to get the higher throughputs. With gp3, we don’t need to do that anymore. We can provision higher throughputs (up to 1000 MB/s) at low capacities. CloudFix can automate their resizing with limited or no downtime. Manual resizing (considering that this is size reduction) is complex and out of scope for this blog.
AWS EBS volume types can be modified without downtime. You can do this by following these steps:
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
- Choose Volumes, select the volume to modify, and then choose Actions > Modify Volume
- The Modify Volume window displays the volume ID and the volume’s current configuration, including type, size, IOPS, and throughput. Set new configuration values as follows:
- After you have finished changing the volume settings, choose Modify. When prompted for confirmation, choose Yes
While the savings aren’t great per volume, they add up really quickly and more so in larger deployments. By automating these steps, you can save 20% or more.