Task Statement 3.2: Design high-performing and elastic compute solutions.
📘AWS Certified Solutions Architect – (SAA-C03)
When designing AWS architectures, choosing the right type and size of compute resources is crucial. It affects performance, cost, and scalability. AWS provides many compute options like EC2, Lambda, Fargate, and container services, and each has its own way of sizing. Let’s go step by step.
1. AWS Compute Options Overview
AWS has several compute types:
- Amazon EC2 (Elastic Compute Cloud)
- Provides virtual servers (instances).
- You choose instance type (CPU, memory, storage, network performance).
- Example instance types:
- t-series – small workloads, low cost.
- m-series – balanced CPU & memory.
- c-series – compute-intensive workloads.
- r-series – memory-intensive workloads.
- AWS Lambda
- Serverless compute (you don’t manage servers).
- You define memory allocation, which also affects CPU power.
- Pricing depends on memory size × execution time.
- AWS Fargate
- Serverless containers.
- You define CPU and memory for each container task.
- Amazon ECS / EKS
- Managed container services.
- Resource allocation depends on the underlying EC2 instance type or Fargate task size.
2. Key Factors for Choosing Resource Type
When deciding which compute resource to use, consider:
- Workload Type
- Compute-intensive → EC2 c-series, or high CPU Lambda.
- Memory-intensive → EC2 r-series, or higher memory Lambda.
- Short-lived jobs → Lambda (serverless).
- Long-running services → EC2 or Fargate.
- Scalability Requirements
- Auto-scaling needed → EC2 with Auto Scaling Group (ASG) or Lambda (automatic scaling).
- Management Overhead
- Need minimal server management → Lambda or Fargate.
- Need full OS control → EC2.
- Cost Efficiency
- Choose size that meets requirements without over-provisioning.
- Lambda / Fargate: pay per use.
- EC2: pay per running instance.
3. Selecting the Right Size
Sizing means selecting the exact capacity needed.
A. EC2 Instance Size
- vCPUs → determine processing power.
- Memory (RAM) → determines how much data your application can handle at once.
- Network performance → higher for large-scale apps.
Example:
- Web server with low traffic →
t3.micro(small vCPU + small memory). - Database server →
r5.large(more memory). - Batch computation →
c5.xlarge(more CPU).
Tips for Exam:
- “Right-sizing” is choosing the smallest instance that still meets performance.
- You can scale up (vertical scaling) or scale out (horizontal scaling).
B. Lambda Memory Size
- Assign memory from 128 MB to 10,240 MB.
- More memory → more CPU power automatically.
- Execution duration may reduce with higher memory, but cost increases.
Tip for Exam:
- Always balance performance vs cost. Don’t pick the max memory unnecessarily.
C. Fargate Task Size
- Define vCPU and memory per task.
- Example: 0.25 vCPU + 0.5 GB memory for a lightweight service.
- Tasks scale independently, so choose enough to handle peak workload.
4. Guidelines for Exam Success
- Understand AWS service limits:
- Lambda max memory = 10 GB.
- EC2 has various instance limits per region.
- Performance metrics matter:
- Use CloudWatch metrics to monitor CPU, memory, and network usage.
- Right-sizing decisions often come from these metrics.
- Always aim for cost efficiency:
- Don’t over-provision.
- Use Auto Scaling or serverless options for dynamic workloads.
- Match workload to the right compute type:
- Batch job → EC2 or Lambda.
- Web/API service → EC2, Fargate, or Lambda.
- High-memory cache → EC2 r-series.
5. Quick Exam Checklist
- ✅ Know EC2 instance types and use-cases (t, m, c, r).
- ✅ Understand Lambda memory → CPU relationship.
- ✅ Know Fargate CPU/memory sizing per task.
- ✅ Understand right-sizing principles: performance vs cost.
- ✅ Know scaling options for each compute type.
