Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Cloud comparison: AWS EC2 vs Azure Virtual Machines vs Google Compute Engine

What are the pros, cons, and differences between AWS EC2 vs Azure Virtual Machines vs Google Compute Engine? It's a cloud VM services showdown. Let's go!

Jun 08, 2023 • 15 Minute Read

Please set an alt value for this image...

The TL;DR:

Despite the proliferation of new and innovative cloud technologies, good old virtual machines (VMs) hosted in the cloud remain one of the most popular services and are often responsible for the lion’s share of cloud spend. 

VMs, often referred to as “instances,” are used in a vast range of scenarios: from web and app servers to highly specialized workloads like machine learning and analytics. Simply put, VMs are the motor that practically runs every aspect of our modern life.

This has set off an intense race between the major cloud providers to gain a competitive advantage. This article will compare the VM services of Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) and offer some insight into one of the most popular aspects of the modern public cloud.


For most readers, the notion of a physical server sitting in a closet and running a singular application (like email or web hosting) is either a distant painful memory or a story that they heard from an older colleague. Historically, that is how most organizations operated, with the larger ones relying on air-conditioned server rooms instead of a closet.

The adoption of virtualization in the early 2000s was a game changer. It made applications more portable and less entangled with the hardware: instead of hosting an application on a dedicated physical server, administrators were now hosting them in “virtual servers”, often on someone else’s hardware.

This paved the way for the modern public cloud, which primarily evolved to fulfill the need to host virtual machines, and continues pretty much to serve that purpose today, albeit with a few more bells and whistles. 

On the surface, a cloud VM is simply the equivalent of an on-premise VM, like the ones you would deploy with VMware or Hyper-V. But modern cloud VMs offer much more than what the VMs of yesteryear did, and this article will explore some of those features and how the three major cloud providers are trying to stand out.

The table below is a brief summary of the VM services offered by AWS, Azure, and GCP:

ServiceGA SinceRegional Availability
AWS EC2August 2006Global
Azure Virtual MachinesJune 2012Global
Google Compute EngineApril 2013Global


Comparing VM prices between cloud providers could very well be an MBA thesis due to the complexity and variables involved. A more practical approach would be to examine a common use case and “compare apples to apples,” so to speak.

Let’s consider the following two common scenarios.

Note that we will be only looking at the monthly cost of the VM (vCPUs, memory, and storage), but in production environments there will be many other contributors to total cost, like data transfer, software licensing, etc.

Scenario 1: One On-Demand VM

The table below compares the on-demand (pay as you go) monthly cost of an average, general-purpose VM used as a web server, running Linux:

ProviderVM TypevCPUsMemory StorageTotal Monthly Cost
AWST4g.xlarge416 GB32 GB SSD$101
AzureBs-series416 GB32 GB SSD$121
GCPE2416 GB32 GB SSD$99

Scenario 2: Five Compute-Optimized Reserved VMs

The table below compares the monthly cost for five compute-optimized instances running Linux, with a reservation term of 3 years:

ProviderVM TypevCPUsMemoryAttached StorageReservation TermTotal Monthly Cost
AWSC5a.4xlarge1632 GB128 GB Standard3 years$1,002
AzureF16s v21632 GB128 GB Standard3 years$905
GCPc2-standard-161664 GB128 GB Standard3 years$1,243

As mentioned earlier, many variables can affect the price. These two scenarios presented here are just examples and the total months cost was obtained using each provider’s pricing calculator. 

Cloud Adventure

Cloud Migration: The Role-Playing Game
A cloud migration campaign takes strategy and knowledge of lore — kind of like a game of Dungeons & Dragons. Join this unique role-playing exercise where experts gameplay through real cloud migration scenarios.

Feature Comparisons

For most use cases, the offerings of the three major providers are very comparable, but there are some differences, especially when it comes to the integrated services and tooling offered.

Since each provider offers a plethora of features around their respective VM service, we will instead focus on a few that are often of most interest.

VM Types

You wouldn’t try to mow your lawn with a pair of scissors, would you? How about cutting up a watermelon with a chainsaw? Hopefully your answer is “no.” There are more appropriate tools for these tasks.

Similarly, you also need to use the right VM type for the right job!

Many applications will be happy with your average run-of-the-mill VM (often referred to as General Purpose). But certain specialized applications are more picky: for example, an analytics application might require a VM that has more compute resources, while a large database application might require a VM optimized for high I/O volume.

Realizing this need for a wide range of VM types, the cloud providers answered the call. You are guaranteed to find something that fits virtually every use case.

The table below shows the available VM types for AWS, Azure, and GCP:

Use CaseAWS EC2Azure Virtual MachinesGCP Compute Engine
General PurposeA1, M4, M5, M5a, M5n, M5zn, M6g, T2, T3, T3a, T4g, MacB, Dsv3, Dv3, Dasv4, Dav4, DSv2, Dv2, Av2, DC, DCv2, Dv4, Dsv4, Ddv4, Ddsv4E2,N2,N2D,N1
Compute OptimizedC4, C5, C5a, C5n, C6g, CgnF, Fs, Fsv2C2
Memory OptimizedR4, R5, R5a, R5b, R5n, R6g, X1, X1e, High Memory, z1dEsv3, Ev3, Easv4, Eav4, Ev4, Esv4, Edv4, Edsv4, Mv2, M, DSv2, Dv2M1, M2
Storage OptimizedD2, D3, D3en, H1, I3, I3enLsv2n/a
Accelerated Compute and High PerformanceF1, G3, G4ad, G4dn, P2, P3, P4, Inf1NC, NCv2, NCv3, NCasT4_v3 (Preview), ND, NDv2 (Preview), NV, NVv3, NVv4, HB, HBv2, HC, HA2

While this list is guaranteed to change over time, a quick glance shows that AWS and Azure seem to have the most diverse list of instance types, while GCP has a narrower list to choose from. 

For general purpose applications, either provider will meet most needs. For more specialized workloads, AWS and Azure might be a better fit.

Regional Availability

Despite how connected our planet is, packets can only travel so fast. Depending on where your users and customers are located in the world, it would make sense to place your infrastructure as geographically close to them as possible. 

All three vendors tout how extensive their network of global data centers is, so let’s compare their global presence. 


AWS boasts 25 global regions, where each region consists of two or more data centers (referred to as Availability Zones), with additional 15 regions planned as of early 2021.


Azure currently operates in 33 regions across the globe, with a number of additional regions planned.


Google Cloud operates in 24 regions, with additional regions planned as well.

All three vendors have a vast global network and are aggressively expanding their global presence. Microsoft Azure seems to have a slight edge on AWS in terms of global presence, and GCP currently has no presence in Africa, the Middle East, or China. 

Cloud Dictionary

Get the Cloud Dictionary of Pain
Speaking cloud doesn’t have to be hard. We analyzed millions of responses to ID the top concepts that trip people up. Grab this cloud guide for succinct definitions of some of the most painful cloud terms.

VM Scaling

One of the big promises of the public cloud is the ability to autoscale infrastructure up or down while only paying for the resources being used. Gone are the days when companies made huge capital investments to accommodate infrequent spikes in demand (like Black Friday) just to remain idle the rest of the year!

VM Scaling in AWS

In AWS, the primary VM scaling service is EC2 Auto Scaling, but a newer service with the generic albeit confusing name of AWS Auto Scaling can be also used (the latter can autoscale other types of cloud resources as well). Triggers are defined in scaling policies, which are applied against logical groups of VMs known as Auto Scaling groups (ASGs).

Scaling policies in AWS can vary from simple to very granular and complex. Triggers can be based on common metrics like CPU utilization, but other cloud-based metrics like CloudWatch can be used, which offer a very wide range of metrics to choose from.

In addition to EC2 Auto Scaling, AWS Auto Scaling is a service that is designed to reduce the complexity of configuring scaling policies.

AWS Auto Scaling automatically builds policies based on user-provided strategies, such as optimizing for cost or availability (or a combination of the two). It also offers predictive scaling, a machine-learning approach that attempts to predict patterns in traffic and scale the infrastructure accordingly.

VM Scaling in Azure

Azure’s approach to autoscaling is very similar to AWS. It leverages a service known as Virtual Machines Scale Sets (VMSS). VMs in a VMSS are managed as a unit and can be scaled up or down when certain predefined thresholds are met, or according to a set schedule.

In Azure you can also use a wide range of metrics to trigger scaling events, including host-based metrics, application-level metrics (using the App Insights service) and in-guest VM metrics, but those require installing the Azure diagnostics extension. 

Azure does not offer any predictive scaling.

If you have been using Azure for very long at all, then you have likely been asked, "Why is our bill so high?” To answer this question, you need to learn more about Azure cost management. Improve planning with costs in mind.

VM Scaling in GCP

In GCP’s Compute Engine, the scaling service is a feature of Managed Instance Groups (MIGs). As a result, VMs have to be in a MIG for autoscaling to be enabled.

An autoscaling policy defines one or more signals that will trigger the scaling event. Signals can be based on target utilization metrics, like CPU utilization, load balancing capacity, or GCP’s Cloud Monitoring metrics. Signals can also be schedule-based, although this feature is still in preview mode and not widely available. Like AWS, GCP also offers predictive scaling based on historic trends that are analyzed by a machine learning algorithm.

Setting up more than one server? We all know it's tedious and error-prone running commands on several servers in a row. Check out our hands-on labs and learn automate the basic set up of a new server in Google Compute Engine using bootstrap scripts.

The table below is a summary of VM scaling features for each provider:

ProviderVM Scaling ServiceOrganizational UnitSupport for Guest VM MetricsPredictive ScalingScheduled Scaling
AWSEC2 Auto Scaling
AWS Auto Scaling
Auto Scaling Groups (ASG)Yes - requires CloudWatch agentYesYes
AzureVirtual Machine Scale SetsVirtual Machine Scale Sets (VMSS)Yes - requires Azure diagnostics extensionNoYes
GCPAutoscalingManaged Instance Group (MIG)Yes - requires the Cloud Monitoring agentYesPreview Feature


What are some ways to save money when a VM does not need to be running?

The most common solution is to simply stop the VM, or terminate it if it is no longer needed. All three providers will let you easily switch your VM from a running state to a stopped state, but AWS is the only cloud provider that has the ability to hibernate a VM by saving from RAM to disk, and then resuming from where the VM stopped when it is started up again, much like the sleep functionality in desktops and laptops.

GCP has a similar functionality but it is currently in preview mode and not generally available.

The table below shows current support for VM hibernation:

ProviderVM Hibernation
GCPPreview Feature

VM Licensing

Here is the understatement of year: cloud licensing is complex.

A full exploration of VM licensing models might require a degree in corporate finance, so instead we will focus on two primary software vendors of interest: Microsoft and Oracle.

Microsoft Licensing and Cloud VMs


When it comes to Microsoft products like SQL Server and Windows Server, all three providers offer an on-demand license as part of the cost of running a VM. This is the most hassle-free option, as it requires no management, upfront costs or long-term investments. This model might not be the most cost-effective option though, especially for customers who already have a licensing agreement with Microsoft and would like to bring their own licenses.


The “bring your own license” (BYOL) model is a popular licensing option for existing Microsoft customers. Historically, a Microsoft BYOL license required that the licensed application is hosted on a dedicated server, or a shared server with the purchase of Software Assurance (SA), which is basically an upgrade that gave customers “License Mobility” rights, allowing them to use Microsoft products on cloud VMs on a shared server.

As of October of 2019, Microsoft modified their licensing model which now requires additional fees even when the application is hosted on a dedicated cloud server. Those fees apply to all major cloud providers, including Azure. 

And in a classic plot twist, Microsoft introduced Azure Hybrid Benefit, which is a licensing program that helps customers significantly reduce the costs of running Microsoft workloads in the Azure cloud.

Bottom line: given the recent licensing changes, a large fleet of VMs running Microsoft products could possibly benefit from being in Azure as opposed to AWS or GCP.

Oracle VM Licensing

Oracle is a popular RDBMS solution, and has complex licensing agreements with the various vendors. While there are several Oracle services offered, when it comes to running Oracle on a cloud VM, the following licensing models apply:

  • Azure: BYOL
  • GCP: not supported

Billing Models

Cloud billing can be so complex that a host of companies have made a fortune offering services and solutions around reducing and simplifying it. While the focus is often on the hourly cost of an on-demand VM, there are other billing models to consider that might lead to a significant reduction in cost.

The following table shows the VM billing models that each provider offers, followed by a brief description of each model:

ProviderVM Billing Models
AWSOn demand
Savings Plan
AzureOn demand
GCPOn demand
Sustained Use
Committed Use
  • On demand: the simplest and most common model. Also known as “pay as you go”: you pay for when the VM is running, without any up-front costs or investments. For licensed software like Microsoft Server or Oracle, the cost of licensing is factored in and managed by the provider. 
  • Spot: for applications that have flexible stop and start times, excess compute resources can be purchased at a deep discount (up to 90% off the on-demand cost) when they become available, based on a bid price that the customer offers. 
  • Reserved: for predictable workloads, customers can purchase reserved capacity and commit to either one or three years and realize considerable savings (up to 60% off the on-demand cost).
  • Savings Plan: only available in AWS, this model is similar to Reserved, where the customer commits to a certain amount of usage over a one year or three year period.
  • Sustained Use: this is a GCP billing model that is similar to AWS’s Savings Plan but without the 1 or 3 year commitment. Customers commit to an amount of usage per month, and receive a discount on every minute billed after the agreed-upon usage is met.
  • Committed Use: GCP’s version of Reserved. They offer 1 and 3 year terms.
  • Preemptible: GCP’s version of Spot instances. 


With the continued popularity of the public cloud, providers set up software marketplaces where vendors can easily provide their products to customers.

These marketplaces helped customers streamline the deployment of their preferred third-party solutions: instead of the tedious process of downloading, installing and configuring software, customers can simply use the vendor-provided image and deploy it on their VM of choice.

The following table gives an idea of the size of each provider’s marketplace:

ProviderNumber of Vendors in Marketplace
AWS~ 12,000
Azure~ 17,000
GCP~ 4,000

While the size of the marketplace might not be as relevant when comparing the three providers, looking at the numbers above paints a clear picture that Azure and AWS are the two largest marketplaces at the moment.

How companies are shifting to multi-cloud
See how companies are preparing for a multi-cloud future as learners begin focusing on products beyond AWS.

The Bottom Line

In this article, we barely scratched the surface of VM services available in the public cloud. Despite the rise of modern innovations like serverless and managed services, cloud VMs will always be a major pillar of the cloud ecosystem.

It is evident that each of the three major cloud providers have invested considerable innovation into this area. While AWS dominated early on, Azure has been able to make great strides and capture a significant cut of the market share, while GCP is a smaller yet growing player.

If you are trying to decide between these three vendors, here are some questions to consider:

  • What types of instances will your application require, and who offers the most competitive pricing for that instance type?
  • Cloud VMs are usually one of many services customers purchase, so what related services are important to you and which provider offers them? (See our breakdown comparing AWS, Azure, and Google Cloud IAM services to see if that might impact your cloud of choice.)
  • Do you have any highly specialized workloads? For example, GCP offers optimized instances for Kubernetes that might outperform AWS and Azure.
  • What types of OS licenses are required? Microsoft-heavy environments could possibly realize more cost-savings in Azure.
  • If all else is equal, do you have an existing relationship with one of the providers? Can one of them offer a better deal than the others?

When deciding which provider wins the AWS EC2 vs. Azure VMs vs GCP Compute Engine race, the obvious (and annoying) answer is: it depends!

About the Author

Moneer Rifai is a cloud developer and architect passionate about helping others break into the field. (LinkedIn |Twitter)

Level up your cloud career

A Cloud Guru makes it easy (and awesome) to get certified and master modern tech skills — whether you’re new to cloud or a seasoned pro. Check out ACG’s current free courses or get started now with a free trial.