What this post covers
In this post I’m going to show what could be considered a “hello world” of Ansible + AWS, using Ansible to launch an EC2 instance.
Aside from the time required to set up an AWS account and install Ansible, you should be able to get your EC2 instance running in 20 minutes or less.
Why Ansible + AWS for Rails hosting?
AWS vs. Heroku
For hosting Rails applications, the service I’ve reached for the most in the past is Heroku.
Unfortunately it’s not always possible or desirable to use Heroku. Heroku can get expensive at scale. There are also sometimes legal barriers due to e.g. HIPAA.
So, for whatever reason, AWS is sometimes a more viable option than Herokou.