AWS S3 Hosting Costs
July 15, 2014
With the Static Site Generator and S3 setup, in theory we should be able to obtain pretty impressive speed, scalability, and especially cost. Let’s take a quick look at theoretical cost of this hosting setup.
With daily posts (optimimism!), and an average of 2 images per post in a high-resolution jpeg format, we’re looking at <300KB per post. Even with these liberal assumptions, it would take us 9.13 years to get over 1 GB of storage.
Current S3 pricing is $0.03 per GB / month for the first TB, so we’re looking at 3 cents of storage per month, until the year 2024, at which point we will be forced to pay 6 cents per month.
Using the same assumptions as above, we’re looking at 5 requests per page (HTML File, JS, CSS, and two images). Amazon charges $0.004 per 10,000 GET requests. At this rate, we would be able to serve 20,000 pages per month for $0.04 (4 cents). Of course, there are the other requests required (PUT, LIST, etc.) for publishing the site to S3, but at the quantities we’re looking at, those are largely negligible.
Data Transfer Pricing
The first GB of transfer out / month is free. So, with our page assumptions, we should easily be able to serve 3,000 pageviews per month for free, and with a more typical 100k file transfer per page, we’re looking at 10,000 pageviews for free each month, beyond that, each subsequent 10,000 pageviews will cost us $0.12/month.
Obtaining traffic anywhere close to what is mentioned above would mean I’m a lot more entertaining than I actually am. Furthermore, if we were posting daily, we certainly wouldn’t have time to do much else. There are also some other potential costs that we will be looking at, i.e. implementing Route 53 for domain routing, and potentially using the CloudFront CDN to improve performance. In any event, we’ll keep you posted on what the actual costs are, but if our calculations above are anywhere close, the $0.10 a month we could pay for hosting should be a substantial bargain.