Explore Cloud Compute with AWS

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe the function and benefits of AWS compute services.
  • Describe serverless computing.
  • Explain the services that support containerized applications in AWS.

Imagine you’re running a new retail startup. You have a shopping app that needs to support a fast-growing number of clients, but its performance is starting to slow due to your local on-premises servers. Now, you’re getting complaints of a poor shopping experience. On top of that, the cost of running your own servers just keeps rising, and it’s starting to feel like you can’t keep up.

With AWS compute services you can deploy virtual servers, use container management, or go serverless in a matter of minutes while saving on time and cost.

Get to Know AWS Compute Services

Building and running your organization starts with compute, whether you are building enterprise, cloud-native, or mobile apps, or sequencing the human genome. AWS compute services allow you to develop, deploy, run, and scale your applications and workloads.

AWS offers a growing portfolio of compute services, including (but not limited to):

EC2 icon depicting a computer chip and two squares against an orange backgroundAmazon Elastic Compute Cloud (Amazon EC2)
Provision secure, resizable compute capacity in the cloud.
Amazon EC2 Auto Scaling icon depicting a computer chip with horizontal arrows pointing towards it and vertical arrows pointing away from it representing the ability to scale in or outAmazon EC2 Auto Scaling
Automatically add or remove EC2 instances according to conditions you define, such as changes in traffic.
Amazon ECS icon depicting a hexagon with two sides sectioned off representing a container against an orange backgroundAmazon Elastic Container Service (Amazon ECS)
Run and scale Docker container applications on AWS.
Amazon EKS icon depicting a hexagon with two sides sectioned off and the letter K in the middle against an orange backgroundAmazon Elastic Kubernetes Service (Amazon EKS)
Deploy and manage containerized applications at scale with Kubernetes open source software.
Lambda icon depicting the Greek letter lambda (two lines forming a triangle with an open base) against an orange backgroundAWS Lambda
Run code without provisioning or managing servers.

Fargate icon depicting a cube sitting on a circular pad with three smaller cubes below against an orange backgroundAWS Fargate
A serverless compute engine for containers that works with Amazon ECS and Amazon EKS.

Get Virtual Machines with Amazon Elastic Compute Cloud (Amazon EC2)

EC2 icon depicting a computer chip and two squares against an orange background

Amazon EC2 enables you to provision virtual computing environments, called instances, with a variety of operating systems. Amazon EC2 provides the same functionality as physical on-premises servers, but with the benefits of hosting in the cloud.

Here are a few benefits:

  • Interact with instances as you would any machine.
  • Increase or decrease capacity within minutes, not hours or days.
  • Commission one, hundreds, or even thousands of server instances simultaneously.
  • Select from multiple instance types, operating systems, and software packages.
  • Integrate with most AWS services.
  • Rapidly and predictably commission replacement images.
  • Harden your environment to meet security-sensitive requirements.
  • Pay a low rate for the compute capacity that you actually consume.
  • Use Amazon EC2 Auto Scaling to maintain availability of your Amazon EC2 instances and automatically scale in or out depending on your needs.

To start building with Amazon EC2, use the AWS Management Console, the AWS CLI, or the AWS SDKs. AWS offers a free tier to help you get started.

What Are the Amazon EC2 Instance Types?

A computer chip on a motherboard

Amazon EC2 Instance types are optimized for different use cases and workloads and come in multiple sizes. Scale resources optimally to meet your workload's requirements.

Consider the following when choosing your instances: core count, memory size, storage size and type, network performance, input/output (I/O) requirements, and CPU technologies.

The chart below provides a high-level view of the different instance categories and which instance types fit into each category.

General Purpose
Compute Optimized
Memory Optimized
Accelerated Computing
Storage Optimized
Instance types
T3, T2, M5, M5A, M4
C5, C4
R5, R4, X1e, X1, L, z1d,
High Memory Instances
P3, P2, G3, F1
H1, I3, D2
Use case
High performance
In-memory databases
Machine learning
Distributed file systems


A larger compute instance can save you time and money if you only need it for a short period of time. So, choosing a higher-cost EC2 instance can be less expensive in the long run, depending on what you use it for.

Understand Serverless Architectures

Serverless allows you to build and run applications and services without worrying about managing and operating servers or runtimes.

Use AWS Lambda to run code without provisioning or managing servers. It’s an event-driven, serverless compute service. You pay only for the compute time you consume—there is no charge when your code is not running.

The service enables you to run code for virtually any type of application or backend service. After you upload your code, Lambda takes care of everything required to run and scale with high availability. You can set up your code to automatically trigger from other AWS services, or you can call it directly from any web or mobile app.

Graphic showing a series of steps: Upload your code to AWS Lambda. Set your code to trigger from an event source such as AWS services, mobile apps, or HTTP endpoints. Lambda runs your code only when triggered. You only pay for the compute time you use.

Run Containers with AWS Compute Services

A cube made up of many smaller cubes

A container is a package that contains all of the components of an application bundled together, including code and dependencies.

You can deploy and run containers using AWS compute services.

  • Amazon Elastic Container Service (Amazon ECS) is a highly scalable, high-performance container management service that supports Docker containers. Amazon ECS enables you to run containerized applications on a managed cluster of Amazon EC2 instances.
  • Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes service. Kubernetes is an open source software that enables you to deploy and manage containerized applications at scale.

A tower with three tiers, the top layer consisting of many small cubes

If you want serverless compute for containers, there’s AWS Fargate. Use AWS Fargate to automatically provision, scale, load balance, and manage scheduling of your Amazon ECS and Amazon EKS containers.

Compute Services Wrap-Up

AWS offers many compute options. Amazon EC2 provides virtual machines. Amazon ECS and Amazon EKS are container-based compute services. Finally, there’s serverless computing that doesn’t require you to provision or manage servers. For serverless, there’s AWS Lambda or AWS Fargate. Both allow you to focus on your core products instead of worrying about managing and operating servers or runtimes, either in the cloud or on-premises.