Overview of AWS Compute Services
 Himanshu Sangshetti
Himanshu SangshettiThis content is from the lesson "3.3 AWS Compute Services" in our comprehensive course.
View full course: AWS Cloud Practitioner Study Notes
At the heart of any application is compute power – the ability to run code, process data, and serve users.
AWS offers a wide range of compute services, from virtual servers to serverless functions, allowing you to choose the perfect fit for your application's specific requirements, scalability needs, and operational preferences.
___
Definition:
- AWS Compute Services provide the processing power necessary to run applications, execute code, and perform tasks in the cloud.
- These services abstract away the physical hardware, allowing you to scale your compute capacity on demand, whether you need full control over virtual servers, easy deployment of containers, or automated execution of code without managing any infrastructure.

___
How It Works & Core Attributes:
Amazon EC2 (Elastic Compute Cloud) and Instance Types
- Function: Amazon EC2 provides resizable compute capacity in the cloud. It allows you to launch virtual servers (called instances) on demand. With EC2, you have full control over the operating system and software stack.
- Instance Types: EC2 instances come in various types, optimized for different use cases. Choosing the right instance type helps optimize performance and cost:  - General Purpose (e.g., M-series): Balance compute, memory, and networking resources for a wide range of workloads like web servers and small databases.
- Compute Optimized (e.g., C-series): Ideal for compute-intensive applications that benefit from high-performance processors, such as high-performance computing (HPC), batch processing, and gaming servers.
- Memory Optimized (e.g., R-series): Designed for workloads that process large datasets in memory, like high-performance databases, distributed web-scale in-memory caches, and real-time big data analytics.
- Storage Optimized (e.g., I-series, D-series): Designed for workloads that require high, sequential read/write access to very large datasets on local storage, such as NoSQL databases, data warehousing, and log processing.
- Accelerated Computing (e.g., P-series, G-series): Uses hardware accelerators (like GPUs or FPGAs) for specific compute-intensive tasks, such as machine learning training, graphics processing, and scientific simulations.
 
- Think: Your own virtual server in the cloud, highly customizable to fit your workload's specific resource needs.

__
Container Services
Containers package an application and all its dependencies (libraries, frameworks) into a single, isolated unit, making them highly portable and consistent across different environments.
AWS offers managed container orchestration services:
- Amazon Elastic Container Service (Amazon ECS): - Function: A highly scalable, high-performance container orchestration service that supports Docker containers. It allows you to easily run and scale containerized applications on AWS.
- Use Cases: Microservices, batch processing, long-running applications that benefit from containerization.
- Think: A simplified way to run and manage your containerized applications without needing to manage the underlying server cluster yourself (unless you choose EC2 launch type).
 
- Amazon Elastic Kubernetes Service (Amazon EKS): - Function: A fully managed Kubernetes service that makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS. Kubernetes is a popular open-source system for automating deployment, scaling, and management of containerized applications.
- Use Cases: When you need the power and flexibility of open-source Kubernetes for highly complex or portable containerized workloads.
- Think: A fully managed version of the popular Kubernetes platform, simplifying complex container orchestration.
 
- AWS Fargate:  - Function: A serverless compute engine for containers that works with both Amazon ECS and Amazon EKS. With Fargate, you don't need to provision, configure, or scale clusters of virtual machines to run containers. You only pay for the compute resources consumed by your containers.
- Use Cases: When you want to run containers without managing servers, focusing purely on application code. Ideal for applications with unpredictable scaling needs.
- Think: Running your containers directly, without even thinking about the servers underneath.
 
__
Serverless Compute (AWS Lambda)
- Function: AWS Lambda allows you to run code without provisioning or managing servers. You pay only for the compute time you consume—there is no charge when your code is not running.
- Characteristics: Event-driven (code executes only when triggered by events like file uploads, database changes, or API requests). Highly scalable and highly available automatically.
- Use Cases: Event processing, web backends (API Gateway integration), mobile backends, data processing triggers, chatbots. Think: Paying for a light switch – you only pay for the electricity when the light is on, not for the bulb or the wiring.

__
Auto Scaling and Load Balancers
These services work together to ensure your applications remain available and performant even under varying demand.
- Auto Scaling:  - Function: Automatically adjusts the number of compute resources (e.g., EC2 instances, Fargate tasks) in your application to maintain performance and optimize costs.
- Purpose for Elasticity: Provides the elasticity characteristic of cloud computing, scaling out (adding resources) during peak demand and scaling in (removing resources) during low demand.
- Use Cases: Handling variable traffic patterns for web applications, batch processing, and other dynamic workloads.
- Think: Automatically hiring more staff when the restaurant gets busy, and sending them home when it's quiet.
 
- Load Balancers (Elastic Load Balancing - ELB):  - Function: Automatically distributes incoming application traffic across multiple targets, such as EC2 instances, containers, or IP addresses, in one or more Availability Zones.
- Purpose: Improves the availability and fault tolerance of your applications by directing traffic away from unhealthy instances and ensuring no single instance is overwhelmed. It also helps achieve elasticity by working with Auto Scaling.
- Types (for Cloud Practitioner, high-level awareness): - Application Load Balancer (ALB): Best for HTTP/HTTPS traffic, advanced routing.
- Network Load Balancer (NLB): Best for ultra-high performance, static IP, TCP/UDP traffic.
- Classic Load Balancer (CLB): Legacy, being phased out for new applications.
 
- Think: A traffic controller at a busy intersection, directing cars (requests) evenly to different lanes (instances) and ensuring no lane gets congested.
 

___
Analogy: A Flexible, On-Demand Fleet of Digital Workers Imagine you run a digital factory that manufactures products (your application's output) for customers worldwide.
- Amazon EC2 (Your Custom Digital Workstations): These are individual workstations you can set up exactly how you need them. You pick the power (CPU), memory, and storage, and install any specialized software. You have full control over each workstation.- Different Instance Types: You might have "speedy" workstations (Compute Optimized) for fast calculations, "big memory" workstations (Memory Optimized) for handling huge design files, or "heavy storage" workstations (Storage Optimized) for archiving.
 
- Containers (Standardized Toolboxes): Instead of custom workstations, you use standardized toolboxes. Each toolbox has a specific set of tools (application dependencies) and is easily moved between any workstation. - ECS/EKS: These are like the foremen or managers who organize which toolboxes go to which workstations and ensure enough workstations are available.
- Fargate: You don't even worry about the workstations; you just hand over the toolbox, and the factory automatically finds space and runs it for you.
 
- AWS Lambda (The "On-Call" Task Force): These are highly specialized workers who only appear when a specific task needs to be done (e.g., someone places an order, a file is uploaded). They do their single task extremely quickly, then disappear until the next task. You only pay for their time during the task.
- Auto Scaling (The Dynamic Hiring Agency): This agency automatically hires more workers (EC2 instances, Fargate tasks) when orders come flooding in, and lets them go when things are quiet, ensuring you always have just the right amount of staff.
- Load Balancers (The Factory Receptionist): This receptionist directs incoming orders to the next available worker on the factory floor, ensuring no single worker is overwhelmed and orders are processed efficiently.
___
Common Applications:
- Web Servers & Application Servers: Hosting traditional websites and backend applications on EC2, containers, or serverless.
- Batch Processing: Running large computational jobs that can be divided and executed across many instances.
- Microservices: Building highly scalable, independent services using containers or serverless functions.
- Big Data Processing: Using powerful instances or serverless functions for data analytics.
- Machine Learning: Training and deploying ML models on specialized compute instances.
___
Quick Note: The "Workhorse" of the Cloud
- AWS Compute services are the "workhorse" of the cloud, providing the fundamental processing power for virtually every application.
- For the Cloud Practitioner exam, focus on understanding the primary purpose of each service and its ideal use cases, particularly how EC2 instance types, container options, and serverless functions fit different compute needs, and how Auto Scaling and Load Balancers ensure your applications are always available and performant.
TAGS
Want to learn more?
Check out these related courses to dive deeper into this topic



