> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compute Platform Selection Analyzing Performance Metrics

> Guide comparing AWS compute platforms (EC2, ECS, EKS, Fargate, Lambda) focusing on CPU, memory, network, disk I/O, latency, and tradeoffs for workload selection.

Students, welcome back.

In this lesson we compare the main AWS compute platforms from a performance perspective so you can choose the right option for your workload. The selection is often binary and driven by workload characteristics such as CPU, memory, network, disk I/O, and latency requirements.

Primary platforms to consider:

* Amazon EC2 (virtual machines)
* Amazon ECS (container orchestration)
* AWS EKS (Kubernetes-based container orchestration)
* AWS Lambda (serverless)

Each platform trades off control, operational overhead, and raw performance. Below we examine those trade-offs and provide guidance for typical scenarios.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/8AbhOfHK1jf6YcM9/images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/compute-platform-selection-aws-logos.jpg?fit=max&auto=format&n=8AbhOfHK1jf6YcM9&q=85&s=d80e685883032070ec8960778c27ea0d" alt="A presentation slide titled &#x22;Compute Platform Selection – Introduction&#x22; showing four orange AWS icons labeled Amazon EC2, Amazon ECS, AWS EKS, and AWS Lambda. The icons are evenly spaced across the slide with a copyright note for KodeKloud." width="1920" height="1080" data-path="images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/compute-platform-selection-aws-logos.jpg" />
</Frame>

CPU (compute) considerations

CPU is like engine horsepower: EC2 (and EC2-backed ECS/EKS) provides the broadest range of CPU capacity and instance types, including high-CPU families and multi-socket instances for sustained, heavy compute.

Key points:

* Burstable T-series (T2/T3/T3a/T4g) use a CPU credit model — monitor `CPUCreditBalance` and `CPUCreditUsage` in CloudWatch. Other families (M, C, R, etc.) are not credit-based and are better for sustained CPU.
* Containers running on EC2 inherit the instance’s CPU characteristics (including credit behavior on T-series). If you use Fargate or Lambda, those serverless options have fixed vCPU profiles and different limits.
* For sustained high CPU, choose EC2-backed deployments (EC2, ECS/EKS on EC2). For small, bursty compute and reduced ops, Fargate or Lambda may be acceptable.

<Callout icon="warning" color="#FF6B6B">
  Burstable instances (T-series) are cost-effective for variable CPU workloads but will throttle when CPU credits are exhausted. Do not use them for sustained high-CPU tasks.
</Callout>

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/8AbhOfHK1jf6YcM9/images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/system-metrics-cards-grid-cpu-network.jpg?fit=max&auto=format&n=8AbhOfHK1jf6YcM9&q=85&s=5f98574765171aa94cc2c41ed54055d0" alt="A grid of numbered cards showing colorful circular icons and labels for system metrics (CPU Utilization, CPU Credit Balance/Usage, CPU Surplus Credit, Disk Read/Write Ops, Network in/out, and Network Packets in/out). The image includes a small &#x22;© Copyright KodeKloud&#x22; notice in the bottom-left." width="1920" height="1080" data-path="images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/system-metrics-cards-grid-cpu-network.jpg" />
</Frame>

Memory utilization

Memory is the application’s cargo space. Serverless memory limits and container task memory settings are typically lower than what you can provision on a large EC2 instance.

Important memory constraints:

* AWS Lambda currently supports up to `10 GB` of memory per function.
* Fargate tasks and other serverless container options impose task-level memory limits that may not match large EC2 instance memory sizes.
* For sustained workloads needing more than serverless memory limits, choose EC2 or ECS/EKS on EC2 so you can select instances with adequate RAM.

Also note: T-series instances are tuned for CPU-burstable workloads and are not ideal for sustained high CPU or very large memory requirements.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/8AbhOfHK1jf6YcM9/images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/memory-utilization-app-usage-bars.jpg?fit=max&auto=format&n=8AbhOfHK1jf6YcM9&q=85&s=a834214bf77330294f666e4d75824c93" alt="A presentation slide titled &#x22;Memory Utilization&#x22; showing an app icon with colorful memory chips above it and two horizontal memory-usage bars below (one mostly full, one mostly empty). The image illustrates differing memory usage levels for an application." width="1920" height="1080" data-path="images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/memory-utilization-app-usage-bars.jpg" />
</Frame>

Latency (response time)

Latency is the elapsed time between a request and the corresponding response. Platform choice affects both baseline and tail latency.

Considerations:

* EC2 provides the most predictable, low-latency behavior since you provision capacity directly.
* Fargate can be low latency when containers are warm; cold starts are possible but generally smaller than Lambda cold starts.
* Lambda has cold-start latency risk. Mitigate with provisioned concurrency or by keeping functions warm if latency is critical.
* For consistent low-latency under heavy load, EC2-backed deployments are usually the safest option.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/8AbhOfHK1jf6YcM9/images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/aws-lambda-ec2-latency-diagram.jpg?fit=max&auto=format&n=8AbhOfHK1jf6YcM9&q=85&s=ad286a8565445c5c74f9299acd55a546" alt="The image is a diagram titled &#x22;Latency&#x22; showing AWS Lambda and Amazon EC2 icons above a timeline from &#x22;Request&#x22; to &#x22;Completion.&#x22; It illustrates latency as the time between a request and its completion, with the caption &#x22;How quickly your system responds to requests.&#x22;" width="1920" height="1080" data-path="images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/aws-lambda-ec2-latency-diagram.jpg" />
</Frame>

Network I/O (throughput)

Network performance matters for high-throughput services, real-time streaming, or heavy egress.

Guidance:

* EC2 instances can be sized for network capacity (for example, instances that advertise “High”, “10 Gbps”, or more). Use instances with enhanced networking (ENA) for lower latency and higher throughput.
* For long-lived, high-throughput connections and heavy egress/ingress, EC2 is generally preferred.
* Serverless options (Lambda, Fargate) work well for bursty or lower-throughput networking patterns but may not match the sustained network throughput of large EC2 instances.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/8AbhOfHK1jf6YcM9/images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/network-io-input-output-map-pins.jpg?fit=max&auto=format&n=8AbhOfHK1jf6YcM9&q=85&s=a9bd5986e27249043dafb563a30b1a0b" alt="A simple diagram titled &#x22;Network I/O&#x22; showing data flowing from an Input marker on the left to an Output marker on the right via a network represented by a row of purple dots. The input and output are shown as colored map-pin icons with hand/arrow and thumbs-up symbols." width="1920" height="1080" data-path="images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/network-io-input-output-map-pins.jpg" />
</Frame>

Disk I/O (storage throughput and IOPS)

Disk I/O is critical for databases, log ingestion, and heavy read/write workloads.

EC2 storage options include:

* EBS volumes (`gp3`, `io2`, `io2 Block Express`) with provisioned IOPS and high throughput.
* Instance store local NVMe on certain instance families for extremely low-latency, high-throughput ephemeral storage.

Notes:

* Lambda can access Amazon EFS for shared file storage, but this adds latency and cost, and Lambda has a maximum execution time of 15 minutes.
* For sustained high IOPS and throughput, EC2 (or ECS/EKS backed by EC2) typically offers better performance-per-dollar.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/8AbhOfHK1jf6YcM9/images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/disk-io-ec2-iops-ebs-ssd.jpg?fit=max&auto=format&n=8AbhOfHK1jf6YcM9&q=85&s=4a819f5ff506d985d9cf4e3d960d834f" alt="A slide titled &#x22;Disk I/O&#x22; showing hard drive icons with colored &#x22;Read&#x22; and &#x22;Write&#x22; labels. It recommends Amazon EC2 (IOPS SSD or EBS‑optimized) for heavy disk usage and standard SSDs or lower‑cost options for less frequent use." width="1920" height="1080" data-path="images/AWS-Certified-CloudOps-Engineer-Associate/Domain-1-Monitoring-Logging-and-Remediation/Compute-Platform-Selection-Analyzing-Performance-Metrics/disk-io-ec2-iops-ebs-ssd.jpg" />
</Frame>

Platform comparison snapshot

| Resource | EC2 (self-managed) | ECS/EKS on EC2 | Fargate (serverless containers) | Lambda (serverless functions) |
| - | -: | -: | -: | -: |
| CPU | Wide range of vCPU sizes and families; sustained high CPU | Same as EC2 (depends on instance type) | Fixed vCPU choices; limited for very large, sustained CPU | Limited vCPU tied to memory; short-lived bursts, cold starts possible |
| Memory | Very large sizes available | Same as EC2 | Task-level memory limits (smaller than large EC2) | Up to `10 GB` per function |
| Network throughput | High, can select instances with 10 Gbps+ | Same as EC2 | Good for moderate throughput; not ideal for sustained 10 Gbps+ | Suitable for sporadic traffic; not for sustained high throughput |
| Disk I/O | EBS provisioned IOPS, instance store NVMe | Same as EC2 | Ephemeral task storage; attach EFS (higher latency) | EFS support (higher latency); 15-minute max execution |
| Latency | Lowest and most predictable | Low if provisioned properly | Low when warm; initial startup costs | Cold starts can add latency; use provisioned concurrency to mitigate |
| Operational overhead | High (manage OS, scaling) | Higher (container orchestration) | Lower | Lowest (managed by AWS) |

Recommended reading:

* [Amazon EC2 instance types](https://aws.amazon.com/ec2/instance-types/)
* [AWS Lambda limits](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html)
* [Amazon EBS volume types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html)

Summary and recommendations

* Choose EC2 or ECS/EKS with EC2 launch type when you need:
  * Sustained high CPU
  * Large memory beyond serverless limits
  * Sustained high network throughput
  * Heavy disk I/O with provisioned IOPS or local NVMe
* Choose Fargate or Lambda when you prioritize operational simplicity and your workload fits within serverless resource limits (bursty or lower steady-state usage).
* For latency-sensitive services with strict response-time SLAs, prefer EC2 or carefully provisioned Fargate/EKS tasks; for Lambda, mitigate cold starts with provisioned concurrency or keep warmers.
* If your application requires more than Lambda’s memory limit (`10 GB`) or sustained heavy I/O, use EC2-based deployments.

<Callout icon="lightbulb" color="#1CB2FE">
  These distinctions appear on exams and in architecture decisions. For performance-driven requirements (high CPU, memory, disk, or sustained network), default to EC2 or container orchestration backed by EC2. When operational simplicity and pay-per-use are more important and resource needs fit serverless limits, consider Fargate or Lambda.
</Callout>

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/aws-certified-sysops-administrator-associate/module/e7f728df-5d8d-4dbb-80f6-33c15cde3034/lesson/2cb731a3-e761-4e3c-bed5-7f2a0a3637fb" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.