Ask HN: Tips on Migrating from Heroku to AWS?

13 points by rememberlenny ↗ HN
I highly value the ease of deployment and monitoring found on Heroku and wonder what the modern way to setup something similar is on AWS? I know of Kubernetes and the CloudFoundary stack, but I feel like there must be some out of the box AMI's that I just dont know about.

I have a Rails hobby project that is costing me ~$200+/- a month because its on the heroku ecosystem. The app is not too wild, but occasionally takes some batch processes which force me to make some spin up higher quality services (increase Redis memory, increase processing power/"worker" count, etc).

Can anyone point me in a direction worth exploring?

12 comments

[ 4.9 ms ] story [ 32.7 ms ] thread
“Expect to pay a lot more unless you value your time as free” is a good rule of thumb here.
I’m a devout fairly knowledgeable AWS fan, but I couldn’t recommend using AWS to “save money” for hobby projects in almost any scenario outside of using Lambda that has a generous always free tier and DynomoDB with an always free tier or Aurora Serverless (Mysql/Postgres) that is really cheap for low use scenarios. Neither seems appropriate for what the poster wants.
AWS already have ElasticBeanstalk which is a Heroku alternative. However, if you decide to build your infrastructure manually, use Terraform.
Or use CloudFormation that is supported by AWS and the technology behind Elastic Beanstalk, CodeStar, SAM, etc....
Agreed. Try to setup a template.yaml for CloudFormation, read the docs, try, get an error, retry... Until you have your perfect setup.

And then only make changes to the template, then package, then deploy.

Dokku started as Heroku alternative. I no longer see Heroku directly mentioned http://dokku.viewdocs.io/dokku/

Years ago I migrated an app from Heroku to AWS ElasticBeanstalk. One requirement was having a Redis server and Heroku simply was too expensive. Migration and later scaing worked alright.

Are you using Dokku in production? I'd be interested to hear how the experience been so far. Are you running it on one single beefy VM or what is your setup?
It might be worth costing out Digital Ocean. They now have managed db services.
AWS Fargate may be interesting as you can use containers but don’t need to manage VMs. There is support for scheduled tasks as well. I’d consider looking for convenience CLIs or wrappers on top.
Get a dedicated server, set up everything once and be done with it. Hetzner EX42 is 34 EUR / month and you get an i7, 64 GB RAM and 2x 512 GB NVMe.
I would start with the codestar rails elastic beanstalk blueprint, possibly swapping beanstalk for fargate if beanstalk isn’t hands off enough or the scaling triggers aren’t finely grained enough. I’d also look at aurora serverless so your db auto scales too. Redis labs seems to have a better product than aws elasticache for redis, and they can place instances in your region, probably in your vpc too.