First create ec2 Ubuntu instance. This can be 14.04 now on MirthConnect 3.2 and above. Hurray!
Great thanks for the original guide: https://gist.github.com/jgautsch/9157402
# Update Ubuntu
sudo aptitude update
# Safe upgrade of Ubuntu
sudo aptitude safe-upgrade