5 Simple Steps To Migrate From Heroku to AWS

While Heroku is ideal for startups because it provides tremendous simplicity and time-saving; Still, when your application starts growing, and its architecture becomes complex, challenges related to DevOps, data security, and scalability begin to jump in. That’s where AWS takes over to overcome these limitations.

In this article, we will walk you through exactly how to migrate your applications from Heroku to AWS in 5 simple steps with Qovery.

Albane Tonnellier

Albane Tonnellier

June 8, 2022 · 5 min read
5 Simple Steps To Migrate From Heroku to AWS - Qovery
Written byAlbane Tonnellier

Albane Tonnellier

Albane started as a Product Owner at Qovery and moved to a Product Marketing Manager position, so you can say she is all about the Product.

See all articles

Read our complete guide on how to Migrate from Heroku to AWS here

Why do startups leave Heroku for AWS?

But first, let’s talk through some main reasons growing startups leave Heroku to AWS. This study shows that almost 50% of growing startups started their business on Heroku and migrated to a Cloud provider - especially AWS (Amazon Web Services). Let us unpack the three big reasons:

  • The lack of transparency on Heroku infrastructure— When startups grow, they all seek better control and ownership of their infrastructure, whether the servers we use or cloud hosting for our apps. Deploying apps on Heroku doesn't give you ownership and control of the infrastructure; Heroku owns it, and users get access to it.
  • The need to have more control— The primary ingredient in scaling up is to have more control. Here Heroku offers limited control and hampers control and limits scalability. For example, in networking, the applications can only listen on a single port, and startup constraints of mandatory booting up in less than a minute, doing development under these constraints limits controls and scaling-up opportunities.
  • Heroku is outrageously expensive— Even though AWS is not known for being cheap, Heroku is up to 10x more expensive than AWS for the same use. The more you use it, the more your bills go up. Peace of mind at a price, but it's tough to scale with Heroku.

Why should you consider Qovery to migrate from Heroku to AWS?

Let’s talk through some of the benefits of using Qovery to migrate from Heroku to AWS:

  • AWS Infrastructure setup is simple and quick— You do not need cloud infrastructure expertise, and you can set up the infrastructure in just four simple steps (see our step-by-step guide here)
  • Get the Heroku-like experience with the flexibility you need— Qovery offers fully automated deployments to your AWS account. You get the same developer experience as Heroku (no DevOps knowledge required), but now you can inspect and tweak anything without Heroku limiting you.
  • Deploy and scale effortlessly— Qovery utilizes a Kubernetes cluster behind the scenes (EKS). Qovery manages and scales services in your existing AWS account so you can focus on building products instead of managing its infrastructure.
Read the case study of Patrick Nollet, CTO of Traace: http://www.qovery.com/case-study/traace
Read the case study of Patrick Nollet, CTO of Traace: http://www.qovery.com/case-study/traace

The 5 Simple Steps to Migrate From Heroku to AWS

Migration has never been that simple! Let me explain how to migrate from Heroku to AWS with Qovery easily. Before we dive in, let’s assume the following:

  • You are familiar with Heroku basics, have a Heroku account, and have access to Heroku CLI
  • You have sign-in on Qovery
  • You have set up your AWS account with Qovery

Let’s start!

Step 1: Create your Dockerfile or use Buildpacks

To build and run your application from Heroku, you can either use Buildpacks or create a Dockerfile. Both options build a container image runnable by a container engine (E.g., Docker).

Qovery runs containers on Kubernetes. Buildpacks automatically detect the language and the framework your application is using. Buildpacks build and run your app. Here is the list of supported languages and frameworks. However, Qovery Buildpacks does not support Procfile with multiple commands at the moment or customs Buildpacks, so if you want to keep complete control of everything, we recommend creating a Dockfile, and if you’re not sure where to start, here is a great tutorial to create a Dockerfile.

Step 2: Create resources on Qovery

After successfully creating your Dockerfile or using Buildpacks, it’s time to create resources on Qovery. You will want to create an application, then possibly a Database, and it starts in the Qovery Console. If you are new to Qovery, we advise you to watch this tutorial on “how to deploy your first app” or this one on “how to create a database”. ⚠️ Once your application is created, it won’t be deployed just yet! Before deploying it, you can configure the CPU, Memory, and Environment Variables... before deploying it. If you want to deploy it before finishing the configuration, you can click on "Actions" > "Deploy".

Qovery console with one application and a database setup
Qovery console with one application and a database setup

Step 3: Configure Environment Variables and Secrets

After creating resources on Qovery, it’s time to configure Environment Variables and Secrets!

Qovery makes the difference between an Environment Variable and a Secret. A Secret is similar to an Environment Variable, but the value is encrypted and can't be revealed. Both are injected as environment variables during the build and the run of your applications.

To extract your environment variables from Heroku, we recommend using the Heroku CLI and exporting all the environment variables and secrets in a .env (dot env) file. Qovery supports the import of a dot env file via the Qovery web interface and the Qovery CLI.

Then you can create your environment variables via the web interface or the Qovery CLI.

Once it’s done, you want to connect your frontend app to your backend app, and for that, we will create an environment variable alias; then, you will need to connect your backend app to your database.

Step 4: Copy data from your Heroku databases to your AWS databases

This one is not yet ready, but it will soon be possible to Replibyte, so keep an eye open for it!

Step 5: Deploy your apps

Now that everything has been created and is well connected, it will be time for you to deploy your application; once on the console, go on your application panel, select “deploy”, and let the magic happen!

Final result

You can’t believe that it can be that easy? Here is a live demo to show you how fast the process is:

If you want to see every step with tutorials, we recently updated our documentation and recommended you check it out.

Wrapping up

We hope this article helped you shed light on what AWS can bring to your startup and made you realize that migrating from Heroku to AWS doesn’t have to be challenging if you use Qovery! Ready to give it a go? Start deploying your apps on AWS with Qovery now 👇

Deliver Self-Service Infrastructure, Faster!

Qovery turns your existing IaC infrastructure and Kubernetes manifests into repeatable blueprints for complete environments.

Try it out now!
Deliver Self-Service Infrastructure, Faster!

You might also like

Heroku Vs. AWS: Data Security Comparison

Heroku and AWS are two of the common choices available for cloud hosting. Heroku is a Platform as Service (PaaS) provider that helps startups develop business applications with simplicity and without needing DevOps expertise in the team. Not only does it provide resources automatically, but you can deploy your applications with just a single click. Heroku has been a top choice for developers for years as it speeds up development cycles by providing fully managed infrastructure and application deployment. AWS is an Infrastructure as Service (IaaS) provider which offers computing power, database, storage, content delivery, and many other services. Although Heroku is ideal for startups because it provides tremendous simplicity and time-saving, when your application starts growing, and its architecture becomes complex, then challenges related to DevOps, data security, and scalability start to jump in. The article below will provide a brief comparison between AWS and Heroku regarding data security. - Read more

April 7, 2022 · 5 min read
Heroku Vs. AWS: Data Security Comparison