What Are the Next Steps?
That was a very basic example of how to run the application on AWS Elastic Beanstalk. In my opinion, Heroku is a bit easier and troubleless, and there is some general knowledge you need to have before you can safely start working with AWS.
Heroku is awesome for things like PoC you just need to deliver ASAP. The free plan is usually enough for them. Moreover, the way you can configure and run plugins on Heroku is pretty convenient.
What if PoC is starting to be more like staging environment, and the customer is saying he would like to release the first MVP next week? The farther you go the easy and convenient Heroku path, the harder it gets to turn and move your app somewhere else.
The biggest issue I dealt with regarding Heroku was its price. The free plan is cool, but the server is falling asleep after 30 minutes of no activity. The first request to the sleeping server takes ages and sometimes even fails due to timeout. Not a big deal, you would say, since the Hobby Plan is only $7/month. That’s true but with the Hobby Plan you only get 512MB of RAM and it’s just a snap for your Ruby on Rails application when users start to generate some traffic.
Two weeks after MVP release your customer says their business partner loved the application and they want to take on board around 2k of users in the 2 next weeks. Sounds great for the Sales Team? It also sounds like a Professional Plan with several Standard ($25-$50/dyno/month) or even Performance ($250-$500/dyno/month) dynos to me.
It’s very easy to switch the pricing plan, but suddenly it appears that the database plugin’s Free Plan reached its limit as well as Redis and LogDNA and the story continues. Alternatively, you can use an EC2 virtual machine on AWS with 2 vCPU and 2GB of RAM which costs less than $20/month. This is obviously not the final cost, because you also need a database and Redis, but it’s still less than on Heroku.
Another difference worth mentioning is that when using Heroku you are not able to connect to your server via SSH and install something. You can only use what Heroku and plugins offer. On AWS you have full SSH access to the virtual machines that Elastic Beanstalk runs.