Compute services are the backbone of your AWS infrastructure. Master virtual servers, serverless, and scaling.
Amazon EC2
Scalable virtual servers in the cloud.
<h3>Amazon EC2 (Elastic Compute Cloud)</h3>
<p><strong>Definition:</strong> Virtual servers in the cloud with resizable compute capacity.</p>
<p><strong>Key Features:</strong></p>
<ul>
<li><strong>Instance Types:</strong> General purpose, compute/memory/storage optimized, accelerated computing.</li>
<li><strong>Pricing Models:</strong> On-Demand, Reserved Instances, Savings Plans, Spot Instances.</li>
<li><strong>AMIs (Amazon Machine Images):</strong> Pre-configured templates for instances.</li>
<li><strong>Key Pairs:</strong> SSH authentication for Linux instances.</li>
<li><strong>Security Groups:</strong> Virtual firewalls for instances.</li>
<li><strong>Placement Groups:</strong> Control instance placement for low latency/high throughput.</li>
</ul>
<p><strong>Use Cases:</strong> Web servers, application servers, batch processing, gaming servers.</p>
EC2 Auto Scaling
Maintains application availability and capacity.
<h3>EC2 Auto Scaling</h3>
<p><strong>Definition:</strong> Automatically adds/removes EC2 instances based on demand.</p>
<p><strong>Components:</strong></p>
<ul>
<li><strong>Launch Configuration/Template:</strong> Instance configuration blueprint.</li>
<li><strong>Auto Scaling Group:</strong> Logical grouping of instances.</li>
<li><strong>Scaling Policies:</strong> Target tracking, step scaling, simple scaling.</li>
<li><strong>Health Checks:</strong> EC2 and ELB health checks.</li>
</ul>
<p><strong>Use Cases:</strong> Handling traffic spikes, ensuring application availability.</p>
Elastic Load Balancing
Distributes incoming traffic across targets.
<h3>Elastic Load Balancing</h3>
<p><strong>Definition:</strong> Distributes incoming traffic across multiple targets.</p>
<p><strong>Types:</strong></p>
<ul>
<li><strong>Application Load Balancer (ALB):</strong> Layer 7, HTTP/HTTPS.</li>
<li><strong>Network Load Balancer (NLB):</strong> Layer 4, TCP/UDP, extreme performance.</li>
<li><strong>Gateway Load Balancer (GWLB):</strong> For 3rd-party virtual appliances.</li>
<li><strong>Classic Load Balancer (CLB):</strong> Legacy (avoid for new deployments).</li>
</ul>
<p><strong>Features:</strong> SSL termination, sticky sessions, health checks.</p>
AWS Lambda
Run code without provisioning servers.
<h3>AWS Lambda</h3>
<p><strong>Definition:</strong> Serverless compute service running code in response to events.</p>
<p><strong>Key Concepts:</strong></p>
<ul>
<li><strong>Function:</strong> Code packaged with dependencies.</li>
<li><strong>Runtime:</strong> Supports multiple languages (Python, Node.js, Java, etc.).</li>
<li><strong>Trigger:</strong> Event sources (S3, DynamoDB, API Gateway, etc.).</li>
<li><strong>Execution Role:</strong> IAM role granting permissions.</li>
<li><strong>Layers:</strong> Shared code and data across functions.</li>
<li><strong>Concurrency:</strong> Simultaneous executions (provisioned/reserved).</li>
</ul>
<p><strong>Use Cases:</strong> Real-time file processing, data transformation, microservices.</p>
AWS Elastic Beanstalk
Deploy web apps effortlessly.
<h3>AWS Elastic Beanstalk</h3>
<p><strong>Definition:</strong> Platform-as-a-Service (PaaS) for deploying web applications.</p>
<p><strong>Components:</strong></p>
<ul>
<li><strong>Application:</strong> Logical collection of Elastic Beanstalk components.</li>
<li><strong>Application Version:</strong> Specific labeled iteration of deployable code.</li>
<li><strong>Environment:</strong> Version deployed on AWS resources.</li>
</ul>
<p><strong>Supported Platforms:</strong> Java, .NET, PHP, Node.js, Python, Ruby, Go, Docker.</p>
<p><strong>Features:</strong> Automatic scaling, load balancing, health monitoring.</p>
Amazon Lightsail
Easy-to-use cloud platform.
<h3>Amazon Lightsail</h3>
<p><strong>Definition:</strong> Simplified virtual private server (VPS) solution.</p>
<p><strong>Features:</strong></p>
<ul>
<li>Pre-configured instances (WordPress, LAMP stack, etc.).</li>
<li>Fixed monthly pricing.</li>
<li>Includes SSD storage, DNS management, static IP.</li>
</ul>
<p><strong>Use Cases:</strong> Simple web applications, blogs, development environments.</p>
Amazon ECS
Container orchestration service.
<h3>Amazon ECS (Elastic Container Service)</h3>
<p><strong>Definition:</strong> Fully managed container orchestration service.</p>
<p><strong>Launch Types:</strong></p>
<ul>
<li><strong>EC2 Launch Type:</strong> Manage your own EC2 instances.</li>
<li><strong>Fargate Launch Type:</strong> Serverless containers.</li>
</ul>
<p><strong>Components:</strong></p>
<ul>
<li><strong>Task Definition:</strong> Blueprint for containers (JSON).</li>
<li><strong>Task:</strong> Running instance of a task definition.</li>
<li><strong>Service:</strong> Maintains specified number of tasks.</li>
<li><strong>Cluster:</strong> Logical grouping of tasks/services.</li>
</ul>
<p><strong>Use Cases:</strong> Microservices, batch processing, machine learning.</p>
AWS Fargate
Serverless compute for containers.
<h3>AWS Fargate</h3>
<p><strong>Definition:</strong> Serverless compute engine for containers.</p>
<p><strong>Features:</strong></p>
<ul>
<li>No infrastructure management.</li>
<li>Pay per vCPU and memory used.</li>
<li>Works with ECS and EKS.</li>
</ul>
<p><strong>Use Cases:</strong> Microservices, CI/CD pipelines, batch jobs.</p>
Amazon EKS
Managed Kubernetes service.
<h3>Amazon EKS (Elastic Kubernetes Service)</h3>
<p><strong>Definition:</strong> Managed Kubernetes service.</p>
<p><strong>Features:</strong></p>
<ul>
<li>Runs upstream Kubernetes.</li>
<li>Integrates with IAM for authentication.</li>
<li>Managed control plane.</li>
<li>Supports Fargate for serverless pods.</li>
</ul>
<p><strong>Use Cases:</strong> Enterprise container orchestration, hybrid deployments.</p>