Heroku or Amazon Web Services – Which is Best for Your Startup?

  • 181856 views
  • 7 min
  • Jan 06, 2020
Sviatoslav A.

Sviatoslav A.

Copywriter

Vlad V.

Vlad V.

Chief Executive Officer

Share

Amazon Web Services (AWS) and Heroku are two commonly used cloud services that let us deploy, monitor, and scale web and mobile apps.

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 Amazon Web Services offer. 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!

AWS vs Heroku for Startups

If we search for a comparison of Heroku and AWS, we’ll see a bunch of articles that juxtapose AWS Elastic Compute Cloud (EC2) with Heroku. But is the Heroku vs AWS Elastic Beanstalk comparison reasonable? Comparing these two products isn’t very logical for several reasons, as we’ll explain shortly. We'll also mention what are the advantages and disadvatanges of one hosting provider vs another.

What are Heroku and AWS?

AWS Elastic Compute Cloud

Elastic Compute Cloud (EC2) is an Infrastructure as a Service product, and is Amazon’s flagship 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 amounts of RAM and storage that satisfy our application’s need. We’ll also install backup servers and hook them up to the main servers.

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 many web development companies, a 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).

Heroku

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. This 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, 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, we need to rapidly send a lot of cached data to our users!
– Here you go: Redis is ready!

– Hey, 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!

– 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 Command Line Interface or in the 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

In short, Heroku vs AWS means Heroku vs Elastic Beanstalk. AWS offers Elastic Beanstalk to simplify application deployment.

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 the two services, check out the table below:

Service AMAZON WEB SERVICES HEROKU

Offered by

Amazon
hosted on proprietary servers

Salesforce
hosted on Amazon Web Services

Pricing

Pay-as-you-go

Pay-as-you-go

Main Offerings

Platform as a Service
(Elastic Beanstalk)

Infrastructure as a Service
(Elastic Compute Cloud)

Platform as a Service

Concept

Ready platform for rapid app deployment
(Elastic Beanstalk)

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

Ready platform for rapid app deployment

Supported platforms

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

Runs environments for Ruby, Python, PHP, Clojure, Go, Java, Scala, and Node.js apps

Scaling

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 Scaling slider in Dashboard or via a Command Line Interface

Geographic
availability

Throughout the world

US and Europe

Main Features

Elastic Beanstalk
Capacity Provisioning
Load Balancing
Auto-Scaling
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

Architecture

Web server/load balancer
Platform
Operating System
Application tier
Database tier

Web server/load balancer
Platform
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
Agreements

Available for Elastic Compute Cloud

Available for Enterprise projects

Conclusion

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 PaaS solutions 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 the PaaS and IaaS solutions should hosting plans change or your application demands a custom infrastructure. Still, it’s best to start with the right service right away.

CONTENTS

Authors:

Sviatoslav A.

Sviatoslav A.

Copywriter

Vlad V.

Vlad V.

Chief Executive Officer

Rate this article!

Nay
So-so
Not bad
Good
Wow
66 rating, average 4.52 out of 5

Share article with

Comments (3)
Anudeep Bichal
Anudeep Bichal about 6 years ago
Nice guidelines for the people interested in startups, clarity in your post is good, and I could assume you are an expert on this subject.
Reply
Sviatoslav A.
Sviatoslav A. about 6 years ago
Thank you for your comment! We appreciate your feedback and we'll keep on delighting you with useful posts!
Reply
IICT Chrompet
IICT Chrompet almost 4 years ago
Thank you
Reply

Subscribe via email and know it all first!