Pen & Paper


EC2 or S3

21 Apr 2014

For a blog like ‘Pen & Paper’ that doesn’t generate much traffic and speed isn’t too big a consideration’, S3, Amazon’s simple storage, may provide a more sensible web platform as far as cost is concerned. I use EC2 for playing with shiny and learning app development, I can easily turn it off to minimize recurring cost. To keep it on 24/7 just for hosting a blog isn’t cost effective. I wasn’t considering S3 when I was moving my Wordpress blog because I thought I could not git push to S3 but now I have found s3_website which enables s3_website push with more than a few configuration options.

To use my private sub-domain ed.usphere.net in EC2, I would simply create an A Record pointing to an EC2’s public IP. This is not feasible for S3 as the domain alias of S3 buckets are all managed by Amazon’s Route 53. To use a private sub-domain for S3 buckets, a Route 53 subscription seems to be the only option.

Amazon has detailed documentation for setting up Route 53 but it took me some time to figure out how to maintain the root domain as is and to move only the sub-domain to Route 53. To do so, I’d have to keep the current DNS server for the root domain unchanged but to create separate NS records for the subdomain using the 4 DNS server names shown as the ‘Delegation Set’ in the Hosted Zone Details in Route 53. After this, wait. I didn’t see any changes until several hours later.