Top 8 AWS Compute Options Compared

You might feel overwhelmed when you are faced with all of the different compute options that are available on AWS.  The fact that AWS keeps introducing new compute services to its customers can make it difficult to choose which one is most appropriate for your needs or use case.

In this article, we will examine eight of the most popular AWS compute services and rate/compare them in five categories:  
  • Setup
  • Reliability
  • Cost
  • Maintenance
  • Abstraction

The last category, Abstraction, bears additional comments.

In a cloud environment, Abstraction represents separation of duties.  It defines the perimeter between the consumer role and the provider role, in this case AWS.  The perimeter of these responsibilities varies depending on the services being used.  Read the AWS Shared Responsibility Model for more info on this concept.

Abstraction levels have been added over the years (i.e. Virtual Machines and Hypervisors, Containers, functions).  Cloud providers can add value and can offload the client from non-strategic activities the higher you go in the abstraction levels.  Customers typically have to do these activities, but they don't necessarily differentiate them from their competitors.

Many of the AWS services and platforms that we review below may appear to have overlapping features or capabilities, this is true.  This is what sometimes leads to the confusion and apprehension on knowing which service or platform to use for a particular use case or scenario. 

AWS offers numerous compute options on purpose.  This provides flexibility in the platforms and  services they offer because there are many different patterns, use cases, and requirements to satisfy.

Below are the four (4) high level abstraction levels and what they entail:
  • Virtual Machine (or instance) Abstraction
    • Customers retain responsibility of the guest operating system and above (middleware, applications, etc.) and their lifecycle. 
    • AWS has the responsibility for managing the hardware and the hypervisor including their lifecycle.

  • Container Abstraction
    • Self-contained environment that includes both the application as well as the software dependencies required to run it
    • Whereas a VM (or instance) virtualizes a piece of hardware so that you can run dedicated operating systems
    • A container virtualizes an OS system so that you can run separated applications with different (and often incompatible) software dependencies
    • Depending on the Service or Platform, the customer may retain responsibility of the instances + the control plane + the data plane, the control plane + the data plane, the data plane only, or only the container itself
    • Depending on the Service or Platform, AWS has the responsibility of the cluster instances + the control plane + the data plane or the cluster instances + the control plane

  • function Abstraction
    • Customers retain responsibility of the application code only
    • AWS has the responsibility for completely managing the infrastructure underneath the function that is running

  • Bare metal Abstraction
    • The customer has access to the physical resources for applications which use low-level hardware features like performance counters and Intel® VT that are not always available in virtualized environments or fully supported. Additionally, the customer can use applications licensed and supported for use in non-virtualized environments or those intended to run on the hardware directly.

The image below (in conjunction with the info above) helps to visualize the level of abstraction, what is managed by the consumer, what is managed by AWS, and where the respective AWS Platforms and Services land.



Finally, let's begin with the comparison.


Table of Contents
EC2
ECS
Fargate
Lambda
Lightsail
Elastic Beanstalk
App Runner
Elastic Kubernetes Service
Summary


EC2

AWS Elastic Compute Cloud (EC2) is a cloud computing service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers. EC2 offers a wide variety of instance types that are optimized for different use cases. CPU, memory, storage, and networking resources can be specified for each instance type. This gives you the flexibility to choose the right instance type for your application. 

You can launch and manage instances using the AWS Management Console or the AWS Command Line Interface. You can also use the API to launch and manage instances. AWS EC2 is a cost-effective way to run your applications in the cloud. 
  • You only pay for the resources that you use
  • There is no minimum fee and you can start and stop your instances as needed.

EC2 isn't the greatest for setup, maintenance, and abstraction, but excels in reliability and costs

Abstraction

EC2 scores poorly when it comes to abstraction. This is due to the fact that EC2 is a low level building block that you can use however you wish. It depends on your use case whether this is good or bad. This is a very good option, especially if you need a fine grained control over the hardware. If you do not, the additional setup and configuration required may seem overwhelming.

EC2 provides two main abstraction layers: instances and security groups.
  • Instances are the building blocks of Amazon Elastic Compute Cloud. It is a virtual machine you can run in the cloud. You can specify the type of instance, the operating system, and the software you want to install. 
  • Security groups are used to control access to your instances. You can specify which IP addresses can access your instances and which ports they can use.

Setup

EC2 also scores poorly for setup. The setup process involves choosing the right instance type for your workload, as well as learning a variety of concepts beyond EC2. An express configuration can be used to launch a basic instance, but any more complex use case requires additional learning.

Reliability

EC2 scores very well when it comes to reliability. The instances will automatically be replaced if there is a hardware problem with any of them. As well as being able to provide instances in advance, they have the option to be provisioned on demand. It is an extremely reliable service with consistent uptime.  The service is highly available and provides a 99.99% uptime SLA. Additionally, EC2 instances are easy to scale up or down as needed, making it a very flexible and reliable cloud computing platform.

Cost

EC2 scores very well in terms of cost. This is due to the flexibility in the instance types you provision that allows you to choose just the right amount of resources for your workload. EC2 costs can vary depending on the type of the instance you select, the region you deploy in, and the amount of compute and storage resources you use. 

AWS provides a number of cost-saving features such as reserved instances (require 1-3 year upfront commitments) and volume discounts that can help keep your EC2 costs under control. For example, reserved instances can provide up to a 75% discount off the hourly rate for an EC2 instance, and volume discounts can provide up to a 30% discount for EBS volumes used with EC2 instances.  

Maintenance

EC2 scores poorly when it comes to Maintenance. If you provision your own virtual machines, you will have to worry about operating system patches, driver updates, and other infrastructure patches. Although some of these items can be automated, you are responsible for maintaining your EC2 machines.

Summary: If you need direct control over your hardware, Amazon EC2 could be the right option for you.


ECS

AWS ECS is Amazon's Elastic Container Service. It is a fully managed container orchestration service that makes it easy to run and manage Docker containers at scale. In addition to providing high availability and scalability out of the box, ECS integrates seamlessly with other AWS services, such as ELB and IAM.

The ECS platform offers many advantages over traditional virtualization solutions while running containerized applications in the cloud. First, ECS eliminates the need to manage complex infrastructure, since all underlying compute and storage resources are handled by AWS. Second, ECS provides high availability and scalability by allowing you to easily launch and terminate container instances as needed. As a final benefit, ECS integrates seamlessly with other AWS services to make cloud deployment and management easier.

There are two configuration modes for AWS ECS: Fargate and EC2. Fargate is a serverless compute engine for running containers, which means you don't have to provision or manage any underlying compute resources. EC2 is a more traditional container deployment model, where you launch and manage container instances on top of Amazon EC2 instances.

As with EC2, ECS suffers from complex setup and maintenance. It does have increased abstraction while excelling in reliability and cost.

Abstraction

Containers can be run on ECS with high levels of abstraction. This means that you don't have to worry about the underlying infrastructure, such as servers and storage. Additionally, ECS provides auto-scaling and high-availability out of the box, making it a highly reliable and scalable container orchestration system.

As a default, ECS runs your containers as "tasks" on EC2 machines. A side agent is installed on those EC2 machines to monitor and maintain task health. We get the benefits of containers by using this configuration rather than EC2 alone. The underlying EC2 instance and things like networking between the instances and the containers still need to be dealt with. For this reason, I rate ECS as satisfactory in terms of abstraction.

Setup

ECS setup can be a bit challenging. In order to set up AWS ECS you must first create an ECS cluster. ECS clusters are logical groups of container instances used to host your applications. Besides configuring your container and vpc networks properly you also need to define your container instances' resource requirements. There can be a significant learning curve if you are using advanced features like load balancing or blue green deployment. 

Once your cluster is up and running, you can launch container instances and deploy your applications to them. You can then schedule and manage containers with ECS, providing a high level of abstraction and ease of use.

As a whole, I give it an ‘OK’ rating.

Reliability

ECS scores very well in terms of reliability. Using the ECS Container Agent, your tasks are placed on machines according to the health of your cluster. If an EC2 machine fails, it automatically replaces itself.

Cost

In terms of Cost you only pay for the underlying Amazon EC2 instances. The only slightly additional cost is for container image storage, which is typically very inexpensive.

Maintenance

With respect to maintenance, our concerns are the same as those we mentioned with EC2. The main focus is on infrastructure maintenance, including things like software vulnerabilities and security patches. We score ECS the same as EC2.


Fargate

AWS Fargate is a serverless compute engine for running containers. This means that you don't have to provision or manage any underlying compute resources. Fargate makes it easy to run containers without having to worry about server management, and provides a high level of abstraction. Fargate is an alternative launch option for ECS. 

This makes it so you can focus more on your application development and less on infrastructure setup and management.

Additionally, Fargate integrates seamlessly with other AWS services, such as ELB and IAM.

Fargate is a well rounded service ideal for ad-hoc tasks and long running jobs. It can even be used as an API or event processor. A 'Good' rating is given to abstraction and setup, and a 'Very Good' rating for reliability, cost, and maintenance.

Abstraction

Fargate is a step above EC2 and vanilla ECS in terms of abstraction. Fargate is a serverless compute engine for containers that provides scalable compute resources on-demand. Fargate makes it easier to deploy and scale containerized applications by removing the need to provision and manage servers. Serverless means that we don't have to worry about machines anymore, instead focusing on containers and tasks that they run. For abstraction, Fargate receives a 'Good' rating.

Setup

It is also easier to set up. By eliminating infrastructure, we can easily eliminate one big step in the setup process.

Reliability

When it comes to reliability Fargate takes into account both your tasks and the underlying infrastructure. Essentially, it's the highest form of reliability in which you need to worry about little else outside your application. I give this a top rating.

Cost

Cost is determined by how much resources you allocate to your tasks. In general, the more virtual CPUs and memory you provision on your task, the more you will pay. You may also have to pay more for storage if your requirements exceed 20 GB. Taking advantage of spot pricing can save you over 70% on costs as well.  However, AWS may interrupt your workloads at any time - this may only be appropriate in some circumstances or use cases.

Maintenance

As with setup, there is little maintenance for Fargate configurations beyond software deployments. Another top rating.


Lambda

With AWS Lambda you get a completely serverless computing option that goes one step further than Fargate. The only thing you need to worry about in Lambda is code, not infrastructure. Scaling is handled by Lambda behind the scenes. Lambda also easily integrates with other AWS services such as API Gateway, SQS, SNS, Step Functions, S3, and others. 

This is one of the most powerful and popular services out there. With Lambda, you can quickly create microservices and backends for your web applications.

Lambda is similar to Fargate in that it is extremely well-rounded. Its cold start, however, hinders its ability to provide reliable and consistent API handling. As far as abstraction, setup, and maintenance go, Lambda does ‘Very Good’, and as far as reliability and cost are concerned, it is ‘Good’.

Abstraction

For abstraction, Lambda earns top marks. Lambda is simple to understand and use because you don't have to worry about servers.

Setup

Setup requires minimal effort. All you need to do is upload your code, and Lambda will take care of the rest. Additionally, you can configure the function's memory setting. Raising your memory setting will also give you more virtual CPUs to speed up lambda invocation. You can use this if you have heavy workloads that demand more resources.

Reliability

In terms of scoring, Lambda is almost top of the list, but it suffers from a phenomenon called Cold Start. A cold start occurs due to Lambda's need to launch containers in response to calls to your function. This occurs only during the initial invocation and not during subsequent invocations. Consequently, these initial requests experience higher latency.

It is because of this phenomenon that API hosting with Lambdas is not always the best option, especially for API sensitive applications with consistent latency requirements. As a result, we scored Lambda ‘Good’.

Cost

It is possible to be very efficient when it comes to costs with Lambda. Billing is based on how often you invoke your function, how long it lasts, and how much memory you configure for each invocation. Lambda isn't the best for running long-running jobs - for that you'll need something like AWS Fargate

Maintenance

The AWS Lambda service scores highly here because there's nothing to maintain. AWS manages all infrastructure.


Lightsail

The AWS Lightsail cloud platform offers users pay-as-you-go computing, storage, and networking resources for their applications.  Lightsail simplifies the process of launching and managing virtual private servers.

There are several features that make Lightsail appealing to users looking for an easy-to-use cloud platform. To begin with, Lightsail provides an easy-to-use user interface for creating and managing virtual private servers. Additionally, Lightsail is able to launch virtual private servers that are optimized for specific workloads quickly using predefined configurations. Finally, Lightsail comes with a number of management tools that make monitoring and managing virtual private servers easy.

The Lightsail platform makes it very simple to get started building web apps and common stacks. The experience is guided, so there's little chance of error. There are, however, tradeoffs associated with convenience. The reliability and cost of Lightsail are ‘OK’, while setup, maintenance, and abstraction are ‘Good”.

Abstraction

Generally, Lightsail operates at a medium abstraction level. By following a guided experience, you are able to launch web applications, websites, WordPress blogs, and other common application configurations in just a few clicks. The Load Balancing feature also lets you add multiple instances to achieve scale. In general, Lightsail simplifies the process of making and managing your compute resources. In case you don't like the abstraction level of Lightsail and want more control, you can easily upgrade your configuration to EC2.

Setup

Getting Lightsail set up is very simple and straightforward. All you have to do is select the configuration you want, such as LAMP, MEAN, WordPress, and Lightsail will handle the rest. Depending on your application, you may also need to be familiar with load balancing, DNS, and CDNs.

Reliability

In my opinion, Lightsail's burst capacity is slightly problematic. A sustained increase in CPU utilization will result in your instance consuming all of its burst capacity, forcing it to operate at a throttled CPU %. It is possible to mitigate this by using a more powerful instance, but it may result in inconsistent performance during periods of sustained traffic.

Cost

As a result, Lightsail comes in slightly lower on the cost scale as well. AWS Lightsail acts as a wrapper around other services provided by AWS. In exchange for convenience, you pay an additional fee. Pre-set configurations are available as part of the pricing model. The cost of a small machine starts as low as $3.50 a month and goes up to $160 for an extremely large one.

Maintenance

In terms of maintenance, Lightsail scores pretty well. There is just one issue I have with it: burst capacity. Your instance needs to be monitored to ensure it doesn't exceed its burst capacity too often.
Pre-configured applications can be launched using Lightsail's simplified launch experience. As a result, you don't have visibility into the underlying infrastructure.


Elastic Beanstalk

AWS Elastic Beanstalk is a cloud-based service for deploying and managing web applications. With Elastic Beanstalk, developers can create and manage AWS resources such as EC2 instances, S3 buckets, and CloudWatch alarms easily. Upload your code and Elastic Beanstalk will automatically handle capacity provisioning, load balancing, and auto-scaling.

Elastic Beanstalk is an ideal solution for developers looking to deploy web applications to the AWS cloud quickly and easily. Elastic Beanstalk eliminates the need to manage EC2 instances, S3 buckets, or other resources on AWS. All you have to do is upload your code and Elastic Beanstalk takes care of the rest.

In some ways, Elastic Beanstalk is more of an orchestration service than a compute service. The system is nevertheless extremely well rounded and excels in many areas, including setup, reliability, and cost. A ‘Good’ score is given to maintenance and ‘OK’ for abstraction.

Abstraction

Elastic Beanstalk scores 'OK' when it comes to abstraction. That's not necessarily a bad thing, though. You probably want some control over your infrastructure if you're using Elastic Beanstalk. 

Setup

Setup is quick and easy with Elastic Beanstalk. Source code can be linked through a git repository, through an IDE, or directly uploaded. The Elastic Beanstalk platform automatically prepares and launches your EC2 instance, monitors its health, and scales the app as needed. It's really easy and earns a ‘Very Good’ score for setup.

Reliability

Because Elastic Beanstalk runs on Amazon EC2, its reliability also scores 'Very Good'. The automatic scaling of your application also makes it possible to handle large workloads.

Cost

Elastic Beanstalk is free to use. In this case, you are simply paying for the resources that the server launches and manages for you. There is no cost premium.

Maintenance

The Elastic Beanstalk platform regularly updates to provide fixes, software upgrades, and new features. Almost all work is done automatically by Elastic Beanstalk, but the underlying hardware still has to be monitored.
As a result, Elastic Beanstalk allows you to build scalable applications while maintaining control over the infrastructure underneath.


App Runner

AWS App Runner is a fully managed service that helps you deploy and manage containerized modern web applications on AWS. App Runner automatically scales your application based on incoming traffic, and you only pay for the resources your application consumes.

With App Runner, you can launch and deploy web applications in just a few clicks. App Runner provisions and configures the underlying AWS resources required to run your applications, such as Amazon Elastic Container Service (Amazon ECS) tasks, Amazon EventBridge event rules, Amazon DynamoDB tables, and Amazon CloudFront content delivery networks (CDNs). App Runner also provides built-in integrations with popular open-source web frameworks and AWS services to help you get started quickly and easily. The service is fully managed and only lets you deploy containerized applications.



App Runner is another extremely well rounded service that scores ‘Very Good’ in all categories except cost.

Abstraction

App Runner scores highly for abstraction. All infrastructure requirements are handled for you, including compute, load balancing, container orchestration, security, and networking. As AWS manages the underlying infrastructure for you, you have no visibility into it.

Setup

The setup process is quite simple - you just need to choose how much memory, vCPUs, and concurrency your application requires. The rest is handled by App Runner.

Reliability

Reliability is rated as 'Very Good'. Unlike AWS Lambda, App Runner is not affected by Cold Start. It is possible to respond instantly to traffic because App Runner maintains provisioned containers that are capable of responding instantly to requests. Suitable for APIs or web applications requiring consistent performance.

Cost

App Runner's cost is slightly lower due to the provisioned containers it needs to manage. Apart from that, you are charged for the number of container instances you require.  AWS App Runner charges a monthly fee for the use of the service.

Maintenance

Lastly, App Runner handles all maintenance for you - no infrastructure patches, no OS updates, nothing.


Elastic Kubernetes Service

AWS EKS is a managed service that makes it easy for customers to run Kubernetes on AWS. EKS provides customers with the ability to launch and manage Kubernetes clusters in a simple and cost-effective way. With EKS, customers can get up and running with Kubernetes in minutes, without having to worry about the underlying infrastructure.

How AWS EKS and AWS App Runner Differ:

There are a few key differences between AWS App Runner and AWS EKS. First, AWS App Runner is a managed service that automatically sets up and scales your web application, while AWS EKS is a managed Kubernetes service that makes it easier to set up and maintain a Kubernetes cluster. Second, AWS App Runner provides built-in support for popular web frameworks such as Django and Flask, while AWS EKS does not. Finally, AWS App Runner is designed to be used with Amazon ECS or Amazon EKS, while AWS EKS can be used with any Kubernetes-compatible container orchestration service.

EKS is another solid service that scores 'Very Good' in most categories.  It is very similar to AWS App Runner in many regards.  It scores slightly better on costs and slightly worse on setup when compared to App Runner.

Abstraction

AWS EKS platform abstraction makes it easier to operate and manage Kubernetes clusters on AWS. EKS provides a managed Kubernetes control plane, making it easier to set up and maintain a Kubernetes cluster. It also provides features such as self-healing and autoscaling, which can help reduce the operational overhead of running a Kubernetes cluster.  AWS EKS abstracts away the complexity of operating and upgrading Kubernetes clusters.

Setup

AWS EKS makes it easy to set up and operate a Kubernetes cluster. The service provides a managed Kubernetes control plane, making it easier to set up and maintain a Kubernetes cluster.   Setup is somewhat more complicated than App Runner or Fargate as you have to configure worker nodes as well as numerous other Kubernetes cluster related configurations.  We still rate Setup as between 'Good' and 'Very Good' considering the managed control plane and speed to deploy an enterprise grade Kubernetes cluster.

Reliability

AWS EKS is designed to be highly reliable.  Additionally, self-healing and autoscaling features help to keep your cluster running smoothly.

Additionally, AWS EKS worker nodes are automatically patched to the latest version of Kubernetes, making it easy to keep your cluster up to date.

Cost

There is no upfront cost for using AWS EKS. You pay only for the resources used to run your Kubernetes cluster, such as compute instances, storage, and data transfer.

Maintenance

The service automatically updates the Kubernetes control plane to the latest version, eliminating the need to manually perform upgrades.

Additionally, AWS EKS worker nodes are automatically patched to the latest version of Kubernetes, making it easy to keep your cluster up to date.


Summary

I hope this article helped broaden your understanding of the variety of compute options offered by Amazon Web Services. The pros and cons of each technology should be taken into consideration when choosing which is right for your project.


full-width

Post a Comment

Previous Post Next Post