Compute services are the engine of the AWS cloud. They are the virtualized servers, containers, and code execution environments that run your applications. A strong grasp of Amazon EC2, AWS Lambda, Elastic Load Balancing (ELB), and Amazon EC2 Auto Scaling is non-negotiable for passing this exam. This comprehensive guide will break down the essential AWS Compute services you need to know, focusing on key concepts, use cases, and how they relate to the core cloud principles of scalability, elasticity, and cost-effectiveness.
Domain 1: Amazon Elastic Compute Cloud (EC2) – Your Virtual Server
Amazon Elastic Compute Cloud (EC2) is arguably the single most important service to understand. It is the service that provides secure, resizable compute capacity in the cloud in the form of virtual servers, known as instances. When an exam question refers to a “virtual machine” or “server,” the answer is almost always EC2.
1.1 The Anatomy of an EC2 Instance
When launching an EC2 instance, you must configure a few core components:
- Amazon Machine Image (AMI): This is a template that contains the software configuration (operating system, application server, and applications) required to launch your instance. Think of it as the recipe for your server.
- Instance Type: This is the classification that determines the hardware resources of the host computer, including the number of virtual CPUs (vCPUs), memory (RAM), storage, and network performance.
- Key Pair: A key pair, consisting of a public key and a private key, is used to securely log into your instance. Security Tip: AWS stores the public key, but you are responsible for the private key—this is a clear example of the Shared Responsibility Model.
1.2 EC2 Pricing Models: Optimizing for Cost
Understanding the four core EC2 pricing models is crucial for cost-optimization questions on the exam (a key objective of the certification).
- On-Demand Instances:
- Concept: Pay for compute capacity by the hour or per-second with no upfront commitment.
- Best Use: Applications with short-term, irregular workloads that cannot be interrupted. Great for development and testing.
- Reserved Instances (RIs) / Savings Plans:
- Concept: Commit to a one-year or three-year term for a significant discount (up to 72% off On-Demand pricing). Savings Plans are a more flexible pricing model that apply to compute usage across different instance families, regions, and operating systems.
- Best Use: Workloads with predictable, steady-state usage that require continuous operation. This is the main answer for maximizing savings on predictable, long-term servers.
- Spot Instances:
- Concept: Allows you to bid on spare EC2 capacity for a massive discount (up to 90% off On-Demand pricing). The major caveat is that AWS can terminate your instance with a two-minute warning if the capacity is needed elsewhere.
- Best Use: Fault-tolerant, flexible, and stateless workloads like batch processing, big data analytics, or background jobs that can handle interruption. This is the ultimate cost-saving option for non-critical, interruptible tasks.
- Dedicated Hosts:
- Concept: A physical server dedicated entirely to your use.
- Best Use: Necessary for meeting strict licensing requirements (like bring-your-own-license software) or regulatory compliance standards.
Domain 2: Scaling and High Availability (ELB & Auto Scaling)
While EC2 provides the server, these two services ensure your application is resilient, highly available, and can handle fluctuating demand.
2.1 Elastic Load Balancing (ELB)
A Load Balancer acts as a single point of contact for clients, distributing incoming application traffic across multiple targets (like EC2 instances) in multiple Availability Zones (AZs). Its primary goals are to increase fault tolerance and high availability.
- High Availability: By distributing traffic across instances in multiple AZs, an ELB ensures that if one AZ fails, traffic is still routed to the healthy instances in the other AZs.
- Health Checks: The ELB continuously monitors the health of its registered targets (EC2 instances). If an instance is unhealthy, the load balancer automatically stops sending traffic to it until it passes the health check.
For the Cloud Practitioner exam, you only need to know that ELB is the service used to automatically distribute incoming traffic and ensure application availability across multiple targets.
2.2 Amazon EC2 Auto Scaling
Amazon EC2 Auto Scaling (often used interchangeably with Auto Scaling Groups or ASGs) is the service that automatically adds or removes EC2 instances in response to changing application demand. It is the key to achieving true elasticity and cost optimization.
An Auto Scaling Group defines:
- Minimum Capacity: The minimum number of instances that must always be running.
- Desired Capacity: The number of instances the group should ideally have.
- Maximum Capacity: The upper limit of instances the group can scale out to.
- Scaling Policies: The conditions (e.g., if CPU utilization is > 70%) that trigger the launch of new instances (Scale-out) or the termination of old instances (Scale-in).
The relationship between ELB and Auto Scaling is symbiotic: ELB handles the incoming traffic, and Auto Scaling automatically adjusts the number of EC2 instances to meet the demand that the ELB is receiving.
Domain 3: Serverless Compute (AWS Lambda)
Serverless computing is a foundational concept on the Cloud Practitioner exam, and AWS Lambda is the cornerstone service. The term “Serverless” is often misleading—there are still servers, but AWS completely manages them for you.
3.1 What is AWS Lambda?
AWS Lambda is an event-driven, serverless compute service that lets you run code without provisioning or managing servers. This is often referred to as Function as a Service (FaaS).
Key Principles of AWS Lambda:
- No Server Management: AWS handles all the operational tasks: provisioning, scaling, patching, and administration. Your team focuses solely on the code.
- Event-Driven: Lambda functions are triggered by “events” from other AWS services. Common triggers include:
- An image being uploaded to an Amazon S3 bucket.
- A message being placed on an Amazon SQS queue.
- An update to an Amazon DynamoDB table.
- An HTTP request via Amazon API Gateway.
- Pay-Per-Use Billing: You only pay for the time your code is actually running (in 1ms increments), and the number of requests. There is no charge for idle time. This is the ultimate form of cost optimization for intermittent workloads.
- Automatic Scaling: Lambda automatically and instantly scales out (runs multiple copies of your function concurrently) to handle spikes in event volume without any manual configuration.
3.2 EC2 vs. Lambda: The Core Difference
A key exam objective is to distinguish between the two primary compute options.
Comparison Criteria | Amazon EC2 | AWS Lambda |
Operational Model | Infrastructure as a Service (IaaS) | Function as a Service (FaaS) / Serverless |
Server Management | You manage the OS, scaling, patching, etc. | AWS manages all the underlying infrastructure. |
Scaling | You must configure Auto Scaling Groups for automatic scaling. | Automatic and instantaneous scaling is built-in. |
Billing | Charged per instance-hour/second, even when the instance is idle. | Charged per execution time and number of requests. No charge for idle time. |
Execution Time | Can run indefinitely (24/7). | Has a maximum execution time limit (15 minutes / 900 seconds). |
Ideal Workload | Stable, long-running web servers, relational databases, persistent services. | Intermittent, event-driven, short-lived tasks (e.g., resizing images, running backend API logic). |
Domain 4: Container Services (ECS and EKS with Fargate)
Containers (like Docker) allow you to package an application with all its dependencies into a single, isolated environment. AWS has services to manage these containers at scale, and the Cloud Practitioner needs a basic definition of each.
4.1 Amazon Elastic Container Service (ECS)
Amazon ECS is a highly scalable, fast container orchestration service that makes it easy to run, stop, and manage Docker containers on a cluster. It is AWS’s native container solution.
4.2 Amazon Elastic Kubernetes Service (EKS)
Amazon EKS is a managed service that makes it easy to run the open-source Kubernetes container orchestration platform on AWS. EKS is typically chosen by customers who already use or prefer the flexibility of Kubernetes.
4.3 AWS Fargate: The Serverless Compute Engine for Containers
The concept that is most important for the Cloud Practitioner exam, which combines the benefits of containers with the simplicity of serverless, is AWS Fargate.
- Fargate is a serverless compute engine for both Amazon ECS and EKS.
- With Fargate, you don’t have to provision, configure, or scale clusters of virtual machines to run your containers. You simply specify the compute resources (CPU/memory) your container needs, and AWS Fargate manages the underlying infrastructure.
- Exam Takeaway: Fargate is the serverless option for running containers. ECS and EKS are the orchestration platforms.
Domain 5: Other Key Compute-Related Services
While EC2, Lambda, ELB, and Auto Scaling are the core, a few other services show up occasionally and are essential to recognize.
5.1 AWS Elastic Beanstalk
Elastic Beanstalk is an Platform as a Service (PaaS) offering that is used for easily deploying and scaling web applications.
- What it does: Elastic Beanstalk takes your application code (written in Java, Python, Node.js, etc.) and automatically handles the entire environment stack: provisioning the necessary EC2 instances, setting up the Auto Scaling Group, configuring the ELB, and even setting up the required security groups.
- The Benefit: It abstracts away the complexity of infrastructure management, allowing developers to focus solely on their code.
- Exam Takeaway: If a question asks for a service that allows a developer to deploy an application without needing to manage the underlying infrastructure (but still uses EC2 instances), the answer is likely Elastic Beanstalk.
5.2 AWS Outposts
AWS Outposts is a service that extends AWS infrastructure, AWS services, APIs, and tools to virtually any customer datacenter, co-location space, or on-premises facility.
- The Need: For customers with low-latency requirements or data residency needs, Outposts allows them to run some AWS services (like EC2) locally in their own data center while still connecting back to the broader AWS cloud for management and a wider array of services.
- Exam Takeaway: Outposts is the answer when a question requires using AWS infrastructure on-premises or locally, outside of an AWS Region.
5.3 Amazon Lightsail
Amazon Lightsail is designed to be the easiest way to launch and manage a virtual private server (VPS) with AWS.
- The Concept: It provides an integrated experience for users who only need a simple, low-cost virtual server, database, or networking environment. Lightsail bundles a set of compute, storage, and networking resources into a single, predictable monthly price.
- Exam Takeaway: Lightsail is the best choice for beginners or for customers who need a simple, fixed-price virtual private server.
Final Review and Exam Success Tips for Compute
The Compute domain is heavily focused on understanding the trade-offs between different service models—IaaS (EC2), PaaS (Elastic Beanstalk), and Serverless (Lambda/Fargate)—and how to design for the AWS pillars of scalability and cost-optimization. The following chart contains the key concepts for cloud practitioners to understand:
Concept | Definition/Core Service | When to Use/What to Answer |
Elasticity | The ability to automatically scale resources up or down quickly. | Amazon EC2 Auto Scaling is the key service providing elasticity. |
Scalability | The ability to handle growth in demand. | ELB and Auto Scaling are used together for scalable EC2-based applications. |
High Availability | Running applications in more than one Availability Zone (AZ). | ELB is the service that distributes traffic across multiple AZs. |
Cost Optimization | Getting the most value for your spend. | Spot Instances (for fault-tolerant), Savings Plans/RIs (for predictable), or Lambda (for intermittent). |
Serverless | AWS manages the operational environment completely. | AWS Lambda or AWS Fargate (for containers). |
Cloud Practitioner Compute Scenario Practice
To truly master this module, practice scenario-based questions that test your ability to select the correct service.
- Scenario 1: A company needs to host a new website that is expected to have highly variable traffic, with large spikes during the holidays. They need to ensure high availability and automatically adjust capacity.
- Best Solution: EC2 instances combined with an Elastic Load Balancer (ELB) and an Amazon EC2 Auto Scaling Group.
- Scenario 2: A development team needs to run a non-critical data processing script every time a new file is uploaded to an S3 bucket. The script runs for less than 30 seconds.
- Best Solution: AWS Lambda. It is event-driven, handles the short execution time, and is cost-effective because the team only pays for the execution time.
- Scenario 3: A large enterprise has an application that must run on a physical server dedicated to their account to comply with a third-party software vendor’s strict licensing agreement.
- Best Solution: Dedicated Hosts for Amazon EC2.
- Scenario 4: A developer wants to quickly deploy a Node.js web application without spending time managing the underlying EC2, Auto Scaling, or load balancing configuration.
- Best Solution: AWS Elastic Beanstalk.
By focusing your study on these core services, their specific use cases, and the cost/operational distinctions between them, you will be well-equipped to tackle the Compute module and take a huge step toward passing the AWS Certified Cloud Practitioner exam.