Heroku vs. AWS: Which Is Best for Your Startup?

DZone 's Guide to

Heroku vs. AWS: Which Is Best for Your Startup?

From service options to flexibility to ease of migration and more, see how AWS and Heroku stack up and when it makes sense to use which service.

· Cloud Zone ·
Free Resource

Amazon Web Services (AWS) and Heroku are two commonly used cloud services that let us deploy, monitor, and scale web and mobile applications. Both services provide us with cloud computing resources and are great for hosting applications. But if you’re building your first mobile or web application, how can you decide which of these options — AWS or Heroku — is best for your application?

Choosing a hosting service becomes even harder when we take a glance at the number of products AWS offers. It’s easy to get lost.

Screenshot of all AWS products

AWS provides a wide variety of products, making it difficult to quickly choose the right solution for your needs. And we haven’t even started considering Heroku!

Let’s dive into the features of AWS and Heroku — and consider the key solutions they offer — to figure out your best option!

Heroku vs. Amazon Web Services for Startups

If we search for a comparison of Heroku or AWS, we’ll see a bunch of articles that juxtapose AWS Elastic Compute Cloud (EC2) with Heroku. But comparing EC2 and Heroku isn’t very logical for several reasons, as we’ll explain shortly.

AWS Elastic Compute Cloud

Elastic Compute Cloud (EC2) is an Infrastructure-as-a-Service (IaaS) product and is Amazon’s flagship AWS offering. Before we’re able to deploy an application on Elastic Compute Cloud, we have to develop server infrastructure that will suit our application.

But what does that look like? Put simply, we’ll need to manually configure and maintain virtualized servers that run our application. We also add database instances, choose and set up an operating system, and set up a load balancer to spread the load across multiple application servers. On top of that, we must select a CPU and RAM and storage that satisfy our application’s need. We’ll also install backup servers and hook them up to the main servers.

AWS Elastic Compute Cloud provides us only with the building blocks. Our task is to select the best blocks for our application and actively manage them, not only set them up. At RubyGarage, our dedicated DevOps engineer is responsible for provisioning EC2 instances, controlling application deployment, and orchestrating EC2 infrastructure (deciding how these ‘building blocks’ interact with each other).


Now let’s see what Heroku offers. Heroku is a Platform as a Service (PaaS) product based on AWS, and is vastly different from Elastic Compute Cloud. It’s very important to differentiate ‘Infrastructure as a Service’ and ‘Platform as a Service’ solutions as we consider deploying and supporting our application using these two solutions.

Heroku is way simpler to use than AWS Elastic Compute Cloud. Perhaps it’s even too simple. But there’s a good reason for this simplicity. The Heroku platform equips us with a ready runtime environment and application servers. Plus, we benefit from seamless integration with various development instruments, a pre-installed operating system, and redundant servers.

Therefore, with Heroku, we don’t need to think about infrastructure management, unlike with AWS EC2. We only need to choose a subscription plan and change our plan when necessary.

This is how a conversation with Heroku might go:

– Hey, Heroku, we need to rapidly send a lot of cached data to our users!
– Here you go: Redis is ready!

– Hey, Heroku, we need more dynos to handle HTTP traffic!
– Yeah, just run the following command in CLI and specify the number of instances, e.g. three web dynos: $ heroku ps:scale web=3

– And what about a PostgreSQL instance?
– You need one – you get one! Run this command in CLI: $ heroku addons:create heroku-postgresql:hobby-dev
– Thanks, Heroku!

– Heroku, we need to restart our dynos! A new app version is coming!
– Just deploy your updated app, I’ll handle this.

As we can see, Heroku conveniently takes care of the details. Thus, we can throw all our efforts into application development. You only need a web developer – or multiple developers – to create an application and push it to Heroku using Git. All management is done via the Heroku Command Line Interface or in the Heroku Dashboard.

Сomparing AWS Elastic Compute Cloud to Heroku is like comparing a microwave to a toaster. Both devices are used for heating food, but they work differently. Maybe this metaphor isn’t the most apt, but it gets across the general point: We use AWS EC2 and Heroku to reach different goals.

So, to be reasonable, we must mention another AWS product that is a direct competitor to Heroku. This product is called Elastic Beanstalk, and it’s also a Platform as a Service product.

AWS Elastic Beanstalk

AWS offers Elastic Beanstalk to simplify application deployment.

Similar to Heroku, we deploy applications on AWS Elastic Beanstalk by running commands in a Command Line Interface (provided by AWS) or by using the Management Console. After deployment, Elastic Beanstalk manages infrastructure without our control.

We generally don’t need to set up capacity provisioning, load balancing, or scaling, although we’re still able to get access to the infrastructure, if necessary, and save multiple configuration options for our application. Elastic Beanstalk uses EC2 instances to host your application, so migrating from AWS Beanstalk to EC2 is easy. And that’s great.

AWS vs. Heroku Features

For a quick comparison of AWS and Heroku, check out the table below:


Offered by

Amazon, hosted on proprietary servers

Salesforce, hosted on Amazon Web Services




Main Offerings

Platform as a Service
(Elastic Beanstalk)

Infrastructure as a Service
(Elastic Compute Cloud)

Platform as a Service


Ready platform for rapid application deployment
(Elastic Beanstalk)

Infrastructure, which must be set up before deployment and managed afterwards
(Elastic Compute Cloud)

Ready platform for rapid application deployment

Supported platforms

Runs environments for Ruby, NodeJS, Python, Go, Docker, PHP, and .NET applications

Initially designed to deploy Ruby on Rails applications
Runs environments for Python, PHP, Clojure, Go, Java, Scala, and Node.js applications


Supports automatic scaling for EC2 and Beanstalk based on time and metrics

Can set up the AutoScale feature before deploying your application

Supports manual scaling with the help of the Scaling slider in Heroku Dashboard or via a Command Line Interface


Throughout the world

US and Europe

Main Features

Elastic Beanstalk
Capacity Provisioning
Load Balancing
App Health Monitoring

Elastic Compute Cloud
Ready templates for deployment
Multiple configurations (CPU, RAM, etc.)

Capacity Provisioning
Database Rollback
Application Rollback
Manual Vertical and Horizontal Scaling
App Health Monitoring
Full GitHub Integration


Standard server architecture:

Web server/load balancer
Operating System
Application tier
Database tier

Standard server architecture:

Web server/load balancer
Operating System
Application tier
Database tier

Built-in Tools for Management and Monitoring

AWS Management Console
AWS Command Line Interface (AWS CLI)
AWS CloudWatch

Heroku Command Line
Heroku Application Metrics
Heroku Connect
Heroku Status

Service Level 

Available for Elastic Compute Cloud

Available for Enterprise projects


When choosing between AWS and Heroku, you primarily need to consider the costs. Will it cost less for you to manage infrastructure yourself, or is it cost-effective for you to reply on a ready (but somewhat costly) platform that manages your infrastructure for you?

In summary, you should use AWS Elastic Compute Cloud when:

  • You need infrastructure flexibility from the first deployment of your application.
  • You can afford a DevOps engineer or several DevOps engineers to manage the infrastructure.
  • You’re ready to spend more time deploying new versions of your app.
  • Your project demands great computational resources.

And you should use Heroku or AWS Elastic Beanstalk when:

  • You need to deploy and test a Minimum Viable Product.
  • You need to improve your application quickly after getting feedback from users.
  • You can’t afford a DevOps engineer (or engineers).
  • Your project doesn’t demand that many computational resources.

If you do choose Amazon Web Services, it’s important to make sure that the company you’re working with has experience managing AWS infrastructure. And if rapid application development is your highest priority, consider Heroku or Beanstalk. Keep in mind that you can always switch between Heroku and AWS EC2 should hosting plans change or your application demands a custom infrastructure. Still, it’s best to start with the right service right away.

aws, cloud, heroku, iaas, paas

Published at DZone with permission of Sviatoslav Andrushko . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}