AWS Costs Every Programmer Should Know

Original author: David Hatanian
  • Transfer
The title of this post is a direct reference to the diagram "Delay times that every programmer should know . " There are currently several versions of this diagram, and it is difficult to establish the original author. Some say it's Jeff Dean .

If you are working on a project that needs to reach a large scale, you need to balance a few issues. What assumptions do we make and how to confirm them? How to quickly enter the market? Will our design support the expected scale?

One of the issues of scaling is the cost of infrastructure. Cloud providers allow you to create thousands of processors and place terabytes of data with one click. But it is expensive, and something that is insignificant for several thousand users can become a huge hole in the budget when you reach millions of users.

In this article, I will list some reference numbers that are useful to keep in mind when considering architecture. These numbers are not intended to be an accurate estimate of the budget. They help determine if your design makes sense or whether it goes beyond what you can afford. Therefore, we consider the orders of magnitude and relative values, rather than absolute values.

Also keep in mind that your company may receive discounts from AWS, and this can make a huge difference.


What is the current cost of the CPU? Through the wonderful interface , I got median vCPU prices.

You can get the source data from the Github repository . I copied them and processed the Python script, which I also took on Github . All prices are for the eu-west-1 region.

Median monthly price
1 state-of-the-art vCPU (4 AWS ECUs)$ 58 / month
With 1 year of convertible reservation$ 43 / month
With 3 years of convertible reservation$ 30 / month
With spot price (estimated)$ 30 / month

I rated the spot prices according to various users. Since prices change throughout the day, I could not find a reliable source of data.

AWS represents the computing power of its machines in Elastic Compute Units, and 4 ECUs more or less correspond to the power of a modern processor. Thus, the prices above are shown for a single processor or core, rather than a single instance.

Here is the price of 1 ECU in dollars per hour in all types of instances that I evaluated:

And here is how prices on request are compared with one and three year reservations (advance payments):


So you want a low latency, high bandwidth and plan to store everything in Redis? Then on top of these costs, the CPU will have to pay for RAM.

I used the same approach to get the median price of 1 GB of RAM on EC2. Elasticache is about two times more expensive than on-demand, but prices are falling pretty quickly in reserved instances.

Median monthly price
1 GB RAM$ 10 / month
1 GB RAM for one-year backup$ 8 / month
1 GB RAM for three years of redundancy$ 5 / month
SSD$ 0.11 / month
HDD$ 0.05 / month
S3$ 0.02 / month
S3 glacier$ 0.004 / month

While this is the net cost of storage, you also need to look at patterns of use for your data. How much processor do you need to work 24/7 in a 24/7 memory?

Same for S3: how much will you pay for read / write requests? I saw workloads where the storage cost on S3 was negligible, but the cost of writing a large number of objects to S3 made the team write their own file system on top of S3.


A few comments on HackerNews indicated that I had missed out on transmission costs. Indeed, if you provide data to end users or need inter-regional replication, you need to consider these costs.

Type of data transferTransfer cost 1 GB
EU / US region to any other region$ 0.02 / GB
APAC region to any other region$ 0.09 / GB
EU / US region on the Internet$ 0.05 / GB
APAC region on the Internet$ 0.08 / GB
Between two AZs of the same region$ 0.01 / GB
Inside one AZIs free

Also popular now: