AWS Elastic Beanstalk: The SAA-C03 Study Guide
AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.
Real-World Analogy: Think of Elastic Beanstalk as a “Professional Property Manager.” You provide the furniture and decor (your code). The manager handles the plumbing (networking), electricity (provisioning), security (IAM), and even hires extra staff (Auto Scaling) when the building gets busy. You don’t need to know how to fix a pipe; you just focus on living in the house.
Core Concepts & Components
To master Elastic Beanstalk for the SAA-C03 exam, you must understand its hierarchy:
- Application: A logical collection of Beanstalk components (versions, configurations, and environments).
- Application Version: A specific, labeled iteration of deployable code (usually a Java .war file or a zip file stored in S3).
- Environment: A version that is deployed onto AWS resources. You can have multiple environments (Dev, Test, Prod) for one application.
Environment Tiers
There are two primary types of environment tiers:
- Web Server Tier: Handles HTTP(S) requests. Typically includes an Elastic Load Balancer (ELB) and an Auto Scaling Group (ASG).
- Worker Tier: Handles background tasks or long-running processes. It pulls messages from an Amazon SQS queue and passes them to the application.
Deployment Strategies
The exam frequently tests which deployment method to choose based on downtime requirements and cost.
| Method | Downtime | Cost | Rollback Strategy |
|---|---|---|---|
| All at Once | High | Low | Manual Redeploy |
| Rolling | Reduced Capacity | Low | Manual Redeploy |
| Rolling with Addl. Batch | None | Medium | Manual Redeploy |
| Immutable | None | High (Double) | Terminate New ASG |
| Blue/Green | None | High | Swap CNAME |
RDS and Elastic Beanstalk
A critical architectural decision for the exam involves the database. You can launch an RDS instance inside the Beanstalk environment or outside it.
- Inside Beanstalk: Good for Dev/Test. Warning: If you delete the Beanstalk environment, the RDS database is also deleted.
- Outside Beanstalk: Recommended for Production. You provide the connection string to the Beanstalk app. This allows the database to persist even if the app environment is terminated or rebuilt.
Exam Tips and Gotchas
- Blue/Green Deployment: If the exam asks for “zero downtime” and “minimal risk” with a “fast rollback,” Blue/Green via CNAME Swap is the answer.
- .ebextensions: This is the mechanism used to configure the environment via YAML/JSON files. It allows you to define resources (like an S3 bucket) alongside your app.
- Docker: Beanstalk supports Single-container, Multi-container (via ECS), and Docker Compose.
- Update Constraints: If you need to change the instance type of your instances, Beanstalk will perform a rolling update.
Decision Matrix / If-Then Guide
| If the requirement is… | Then choose… | |
|---|---|---|
| Quickest deployment with no concern for downtime | All at Once | |
| Zero downtime with no extra cost | Rolling | |
| Zero downtime with full capacity maintained | Rolling with Additional Batch | |
| Highest confidence, zero impact on existing load | Immutable Deployment | |
| Major version update or platform change | Blue/Green (CNAME Swap) |
Topics covered:
Summary of key subtopics covered in this guide:
- Application vs. Environment vs. Version hierarchy
- Web Server Tier vs. Worker Tier (SQS integration)
- Deployment Strategies (All-at-once, Rolling, Immutable, Blue/Green)
- RDS Integration lifecycle (Internal vs. External)
- Configuration management via .ebextensions
AWS Elastic Beanstalk Architecture
Integrations
Service Ecosystem
- IAM: Instance profiles for EC2 permissions.
- CloudWatch: Standard & Enhanced health monitoring.
- S3: Stores application versions/logs.
- X-Ray: Enabled via daemon for tracing.
Performance
Scaling & Health
- Scaling: Based on CPU, Network, or Request count.
- Health: Basic (ELB checks) or Enhanced (OS-level metrics).
- Worker Tier: Uses SQS to decouple heavy processing.
Cost
Cost Optimization
- No Extra Charge: You only pay for the underlying resources (EC2, S3, RDS).
- Dev Strategy: Use “Single Instance” type to avoid ELB costs.
- Cleanup: Delete unused Application Versions in S3.
Production Use Case: A startup needs to deploy a Node.js API quickly without hiring a DevOps team. They use Elastic Beanstalk with an External RDS and Blue/Green deployments to ensure zero-downtime updates as they iterate rapidly.