Cyber Intelligence
Cloud Technology and Services · 34% of exam

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
Purchasing options (crucial for exam):
OptionDescriptionSavings vs On-Demand
On-DemandPay per second/hour; no commitmentBaseline
Reserved Instances1 or 3 year commitmentUp to 72%
Savings PlansFlexible; commit to $ per hourUp to 72%
Spot InstancesUse unused AWS capacity; can be interruptedUp to 90%
Dedicated HostsPhysical server for complianceVaries

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
Amazon EKS (Elastic Kubernetes Service): managed Kubernetes service. AWS Fargate: serverless compute engine for containers (used with ECS and EKS). Exam tip: Spot Instances can be interrupted by AWS with 2-minute warning. Never run critical production workloads on Spot. Use On-Demand for variable, Reservations for predictable sustained workloads.

Exam Focus Points
  • 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
Knowledge Check

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.

Start CLF-C02 prep free10-day free trial available