5.1 Compute Services Deep Dive
Key Takeaways
- Elastic Beanstalk handles capacity provisioning, load balancing, auto-scaling, and health monitoring — you just upload code.
- AWS Batch dynamically provisions EC2 or Spot instances to run batch computing jobs without manual cluster management.
- Amazon Lightsail is the simplest way to launch a virtual private server — ideal for simple websites and small applications.
- EC2 Instance Store provides temporary block-level storage physically attached to the host — data is lost when the instance stops.
- Placement Groups control EC2 instance placement: Cluster (low latency), Spread (high availability), and Partition (large distributed systems).
Compute Services Deep Dive
AWS Elastic Beanstalk — PaaS for Web Applications
Elastic Beanstalk is the easiest way to deploy and run web applications on AWS. You upload your code, and Beanstalk automatically handles:
- Capacity provisioning
- Load balancing
- Auto-scaling
- Application health monitoring
- Patching and platform updates
Supported platforms: Java, .NET, PHP, Node.js, Python, Ruby, Go, Docker
Key facts for the exam:
- Free — You only pay for the underlying resources (EC2, ELB, RDS, etc.)
- You retain full control over the resources Beanstalk creates
- Great for developers who want to focus on code, not infrastructure
- Supports multiple environments (production, staging, development)
On the Exam: Elastic Beanstalk = "I just want to deploy my web app without worrying about infrastructure." It is PaaS on AWS.
AWS Batch
AWS Batch plans, schedules, and executes batch computing workloads across the full range of AWS compute services.
How it works:
- You define jobs (what to run), job definitions (how to run), and compute environments
- Batch automatically provisions the optimal quantity and type of EC2 or Spot instances
- Jobs run in Docker containers on managed or unmanaged compute environments
Use cases: Genomics analysis, financial risk modeling, media transcoding, large-scale simulations
Amazon Lightsail
Amazon Lightsail is the simplest way to get started with AWS. It provides everything needed to launch a project: virtual servers, storage, databases, and networking at a predictable monthly price.
| Feature | Detail |
|---|---|
| Pricing | Fixed monthly (starting at $3.50/month) |
| Use Cases | Simple websites, blogs, small applications |
| Includes | Compute, storage, data transfer in one bundle |
| Managed | Simplified management compared to EC2 |
EC2 Storage Options
Instance Store vs. EBS
| Feature | Instance Store | EBS |
|---|---|---|
| Persistence | Temporary (ephemeral) — data lost when instance stops | Persistent — data survives instance stop/restart |
| Performance | Very high (physically attached) | High (network-attached SSD/HDD) |
| Backup | Cannot snapshot | Supports snapshots (stored in S3) |
| Use Case | Temporary data, caches, buffers | Boot volumes, databases, persistent storage |
On the Exam: Instance Store = ephemeral (temporary). EBS = persistent. If a question mentions data that must survive instance termination, the answer involves EBS or S3.
EC2 Purchasing Options Advanced
Spot Fleet
A Spot Fleet is a set of Spot Instances and optionally On-Demand instances that AWS launches to meet your target capacity. Spot Fleets automatically request Spot Instances from the pools with the lowest price.
Capacity Reservations
On-Demand Capacity Reservations ensure you have EC2 capacity available in a specific AZ when you need it. Unlike Reserved Instances, there is no commitment term, but you pay On-Demand rates whether or not you use the capacity.
Dedicated Hosts vs. Dedicated Instances
| Feature | Dedicated Host | Dedicated Instance |
|---|---|---|
| Billing | Per host | Per instance |
| Visibility | You see the physical server | You do not see the physical server |
| BYOL Support | Yes (socket/core visibility) | No |
| Placement Control | Yes (choose specific host) | No |
| Use Case | BYOL licensing, compliance | Compliance, hardware isolation |
Elastic Load Balancing Deep Dive
Health Checks
All ELB types perform health checks on registered targets. Unhealthy targets are automatically removed from the load balancer rotation until they become healthy again.
Cross-Zone Load Balancing
Distributes traffic evenly across all registered targets in all enabled AZs, even if one AZ has more instances than another.
Connection Draining (Deregistration Delay)
When an instance is being deregistered or becomes unhealthy, the load balancer allows existing connections to complete for a configurable time (default: 300 seconds) before removing the instance.
Which AWS service automatically handles capacity provisioning, load balancing, and auto-scaling for web applications, so developers can focus solely on their code?
What happens to data stored on an EC2 Instance Store volume when the instance is stopped?
A small business wants to host a simple WordPress blog on AWS with predictable monthly pricing. Which service is most appropriate?
Which EC2 option should a company choose if they need to use their existing Windows Server licenses that are tied to physical server cores?