Heroku vs AWS


AWS is an IaaS and Heroku is a PaaS. IaaS provides components to build things on top of it. It gives you more flexibility and more power but it also means you must know how to play around with its versatility. PaaS gives your an environment with standard config settings to get your application to run asap.

Setting up

To set up on AWS, you set up your EC2 instances, load balancer (Varnish), server software (Phusion Passenger and nginx) and database instances (PostgreSQL), deployment system (Capistrano). With heroku it’s just

git push heroku master


Heroku runs only on us-east-1 and eu-west-1. For AWS, you will have a choice of many data centers that includes Singapore, Tokyo, Sao Paolo and it runs in 100% availability.


In AWS, configure Capistrano files to increase or decrease the number of instances. Rework the Puppet config so Varnish will know of the changes. With heroku, it’s

web: bundle exec rails server
worker: bundle exec rake jobs:work
heroku scale web:2 worker:10

This will result in you having 2 web dynos and 10 worker dynos running.

Cost Efficiency

Heroku cost twice AWS. But don’t underestimate the ‘hidden costs’ of setup and maintenance. Each dyno in Heroku will secure 512MB RAM.