L10. Compute: EC2, Lambda, Elastic Beanstalk, and ECS
Video generating
Check back soon for the video lesson on Compute: EC2, Lambda, Elastic Beanstalk, and ECS
AWS offers multiple compute options for different workloads. The Cloud Practitioner exam tests EC2 instance types and purchasing options, Lambda serverless, Elastic Beanstalk PaaS, and container services.
Amazon EC2
EC2 (Elastic Compute Cloud) provides resizable virtual servers in the cloud. Instance types:
- General purpose (t3, m6): balanced compute, memory, networking
- Compute optimized (c6i): high-performance processors for compute-heavy tasks
- Memory optimized (r6i, x2): fast performance for memory-intensive workloads
- Storage optimized (i3, d3): high sequential read/write for databases
- Accelerated computing (p3, g4): GPUs for ML/AI and graphics
| Option | Description | Savings vs On-Demand |
|---|---|---|
| On-Demand | Pay per second/hour; no commitment | Baseline |
| Reserved Instances | 1 or 3 year commitment | Up to 72% |
| Savings Plans | Flexible; commit to $ per hour | Up to 72% |
| Spot Instances | Use unused AWS capacity; can be interrupted | Up to 90% |
| Dedicated Hosts | Physical server for compliance | Varies |
AWS Lambda
Lambda is a serverless compute service that runs code in response to events without managing servers. How it works: upload code (function), configure a trigger (HTTP request, S3 event, schedule), Lambda runs it and you pay per 1ms of execution. Use cases: API backends, data processing, real-time file processing, scheduled tasks. Limits: max 15-minute execution timeout, max 10GB memory.
AWS Elastic Beanstalk
Elastic Beanstalk is a PaaS service that automatically handles deployment, capacity provisioning, load balancing, and auto-scaling for web applications. You provide: your application code. AWS manages the infrastructure. Supports: Java, Python, Node.js, PHP, Ruby, Go, .NET, Docker.
Container Services
Amazon ECS (Elastic Container Service): managed container orchestration service.- EC2 launch type: you manage the underlying EC2 instances
- Fargate launch type: serverless containers; no servers to manage
- ✓EC2 purchasing options: On-Demand (flexible), Reserved (1/3 year commitment, 72% savings), Spot (interruptible, 90% savings)
- ✓Spot Instances use unused AWS capacity and can be interrupted with 2-minute notice; avoid for critical workloads
- ✓Lambda is serverless event-driven compute; you pay per millisecond of execution; max 15-minute timeout
- ✓Elastic Beanstalk is PaaS: upload code, AWS manages the infrastructure, auto-scaling, and load balancing
- ✓AWS Fargate is serverless containers: no EC2 instances to manage; used with ECS or EKS
1. A company runs a batch data processing job on the weekend that can tolerate interruptions. Which EC2 purchasing option provides the maximum cost savings?
2. A developer wants to deploy a Python web application to AWS without managing any servers, load balancers, or auto-scaling configuration. Which service is most appropriate?
Recommended: Pluralsight
Complement these lessons with Pluralsight: structured CLF-C02 learning paths, AWS hands-on labs, and realistic practice questions for exam day.