AWS Tip - Save Money by Deleting Unused EC2 Instances and Storage
Amazon's AWS public cloud is often used by IT pros to test and prototype ideas on their own often replacing a traditional home lab setup. The ability to quickly spin up virtual infrastructure components and then shut them down after testing completes is a great help for exploring new ideas. Costs for AWS are based upon consumption. Customers "pay by the drink." Because the monthly bill is based on what's consumed, it's important to keep track of the costs.
Recently, I was confronted with a higher than usual monthly bill. I wasn't sure how it was possible as I hadn't used the service very much the previous month. Moreover, I always remember to shutdown unused servers.
Amazon makes it easy to drill down in a bill to see where the costs originate. In my case, the charges weren't from compute, but storage. Specifically, the storage costs were associated with Elastic Block Store (EBS) capacity. EBS storage is used by AWS EC2 virtual servers for OS and data volumes.
It's important to note that storage is fairly cheap in small amounts, but it has a significant cost when provisioned at scale. And that cost is regardless of the servers being powered on or not. Per Amazon, they charge "by the amount you provision in GB per month until you release the storage." This quote is taken from Amazon's EBS Storage documentation (https://aws.amazon.com/ebs/pricing/). Fortunately, Amazon bills "in per-second increments, with a 60 second minimum." This is great for minimizing costs because the billing stops shortly after the storage is released.
Save yourself unnecessary costs by always deleting unneeded servers and the storage related to those servers. If you've built infrastructure as code, then there should be little worry about re-creating servers in the future if needed. If there is data you'd like to keep, then I recommend copying that data to cheaper S3 storage then delete the EBS volumes. Save yourself surprises by remembering that everything in the AWS cloud costs(sometimes by the minute), and that those costs can best be controlled by completely deleting resources when you are done with them.