Update: Amazon now offers an improved cost calculator which is much easier to use.
- Author and member of the year 2019 – Why DevOps still doesn't rule the IT world - Wed, Jan 1 2020
- Results of the 4sysops member and author competition in 2018 - Tue, Jan 8 2019
- Why Microsoft is using Windows customers as guinea pigs - Reply to Tim Warner - Tue, Dec 18 2018
In my last article in this series, I discussed the storage costs for my Amazon EC2 server. Today I will focus on the bandwidth and instance costs. As we will see, things are getting a bit more expensive now.
Amazon EC2 bandwidth costs ^
One of the things I really dislike about EC2 are the bandwidth costs. One GB inbound data transfer costs $0.10 and one GB outbound traffic costs $0.17. This doesn't seem to be much. However, in my case the bandwidth costs are a significant part of the overall monthly fees. In September, I paid about $15 for data transfer, which corresponds to approximately 90GB. I enabled HTML encryption in Apache after I moved to EC2, but this didn't really help because most of my traffic comes from the screenshots. I also download backups of the database and the screenshots every day, which equals up to 15% of my monthly bandwidth costs. In my view, external backups are absolutely necessary because if someone hacks your Amazon account , then you might lose all your data even if you have backups within cloud.
If you rent a dedicated server or a VPS, 1000GB ore more are often already included in the monthly fees. This amount of traffic would cost $340 at Amazon! Of course, most users never use 1000GB, and that's exactly the reason why conventional providers can be so generous. However, it gives customers a safe feeling. Just in case a friendly hacker uses your server as a download server for his community, you are on the safe side until you recognize what's going on. Moreover, since traffic changes all the time, you always have to be vigilant and check your bandwidth costs regularly. Charging for bandwidth usage per GB is a relic of the Internet stone age, in my opinion.
Amazon EC2 instance costs ^
The major cost factor certainly always is the EC2 instance. These fees heavily depend on the instance type (dependent on RAM, CPU power and operating system) you use and whether you purchase a reserved instance. I am using the High-CPU-Medium Linux instance type (1.7 GB of memory, 5 EC2 Compute Units, 350 GB storage), which costs $0.20 per hour as an on-demand instance. For a reserved instance of this type, you pay $0.06 per hour. On an one year plan, the fee for reserving a High-CPU-Medium instance is $455 and on a three year term you pay $700. I chose the one year term because three years is a long time in the always evolving cloud business. Hence, the EC2 instance costs amount to $81.72 (=455/12 + 0.06*24*365/12) per month in my case. Note that reserved instances are currently not available for Windows systems.
The hourly rates for the instance types vary between $0.03 and $0.24 for reserved instances. Therefore, choosing the optimal instance type is key in minimizing your EC2 costs. You might find this site helpful for finding the appropriate instance type for your purpose. The best method certainly is to just try them out. You can play with on-demand instances until you get a feeling for the performance and then buy the corresponding reserved instance. This is where pay-as-you-go pricing comes in handy.
Basically, there are four major factors to remember when it comes to EC2 price calculation: S3 storage, EBS storage, EC2 bandwidth, and EC2 instance type. In my case, the storage costs are negligible ($2), the bandwidth costs are significant ($15) and the EC2 instance costs are decisive ($82). I hope that this will help you to get an idea of how Amazon EC2 pricing works.
However, the most interesting part of this story is that I needed two posts to explain my case and I didn't even discuss all the factors listed in Amazon's Simple Monthly Calculator simply because they turned out to be irrelevant. Perhaps I could have made it all shorter with less babbling. But on the other hand, if I had to explain what renting a dedicated or conventional virtual server costs, one sentence would have been enough. And imagine how complicated things will get if you have to calculate the costs for moving a whole datacenter to EC2.
In my view, this relatively convoluted price structure is a major disadvantage of EC2. The pay-only-what-you-use philosophy is typical for most new information and telecommunications technologies. Once the technology matures and prices drop, providers move over to flat rates. For example, mainframe computation was charged per CPU time and home users paid for broadband Internet by the hour and/or for the data transferred in the beginning. Even though usage-based rates might seem to be the fairest pricing model, most people prefer easy-to-calculate and predictable costs. Pay-as-you-go pricing is nice-to-have as an additional feature, but those cloud providers who rely only on pay-only-what-use will lose.