This lesson combines 4 topics: AWS Well-Architected Framework Overview, Operational Excellence Pillar, Security Pillar, Reliability Pillar.
Learning Objectives
- Understand the overall Well-Architected Framework
- Know the 6 pillars and how they relate to each other
- Know how to use the Well-Architected Tool
- Understand the design principles of Operational Excellence
- Know the best practices for operations
- Know the AWS services that support this pillar
- Understand the design principles of the Security pillar
- Master the 7 focus areas (best practice areas) of Security
- Know the AWS services for security
- Understand the design principles of the Reliability pillar
- Know the concepts: RTO, RPO, fault tolerance
- Know the patterns for high availability
Part 1: AWS Well-Architected Framework Overview
1. Introduction to the Well-Architected Framework
Definition
The Well-Architected Framework is a set of best practices and design principles that help you:
- Evaluate and improve cloud architectures
- Understand the trade-offs in design decisions
- Build secure, high-performing, resilient, efficient systems
History
2015 (Oct): Launched with 4 pillars
(Security, Reliability, Performance Efficiency, Cost Optimization)
2016 (Nov): Added the Operational Excellence pillar (→ 5 pillars)
2021 (Dec): Added the Sustainability pillar (→ the current 6 pillars)
2. The Six Pillars of Well-Architected
Overview of the 6 Pillars
| Pillar | Focus | Key Question |
|---|---|---|
| Operational Excellence | Running and monitoring systems | "How do we operate efficiently?" |
| Security | Protecting data and systems | "How do we stay secure?" |
| Reliability | Recovering from failures | "How do we ensure uptime?" |
| Performance Efficiency | Using resources efficiently | "How do we achieve performance?" |
| Cost Optimization | Avoiding unnecessary costs | "How do we save money?" |
| Sustainability | Reducing environmental impact | "How do we stay sustainable?" |
3. General Design Principles
1. Stop guessing capacity needs
2. Test systems at production scale
- You can create a production-scale test environment
- Pay only while testing
- Terminate it when testing is done
3. Automate to make experimentation easier
- Infrastructure as Code
- Automated testing
- CI/CD pipelines
4. Allow for evolutionary architectures
- Design for change
- Loose coupling
- Modular components
5. Drive architectures using data
- Collect metrics
- Make data-driven decisions
- Continuous improvement
6. Improve through game days
- Simulate production events
- Test incident response
- Build confidence
4. Trade-offs Between Pillars
Security vs Performance
Cost vs Reliability
Higher Availability = Higher Cost
99.9% (3 nines): Single AZ deployment $
99.99% (4 nines): Multi-AZ deployment $$
99.999% (5 nines): Multi-Region deployment $$$
Trade-off: Decide acceptable downtime vs budget
Performance vs Cost
On-Demand Capacity:
- Instant performance scaling
- Pay premium for flexibility
Reserved Capacity:
- Commit for discount
- May not scale as quickly
Trade-off: Flexibility vs cost savings
5. Well-Architected Tool
How to Use It
- Define the workload in the AWS Console
- Answer the questions for each pillar
- Review the identified risks
- Create an improvement plan
- Track progress over time
Workflow
Tool Output
- High Risk Issues (HRIs)
- Medium Risk Issues (MRIs)
- Improvement plan with priorities
- PDF report for sharing
6. Well-Architected Lenses
Standard Lenses
- Serverless Lens
- SaaS Lens
- Container Build Lens
- Data Analytics Lens
- Machine Learning Lens
- IoT Lens
- Financial Services Lens
- Healthcare Lens
- Games Industry Lens
Custom Lenses
- Create your own lenses for your organization
- Add organization-specific questions and best practices
- Share across accounts
7. Exam Questions
Common Question Types
- Identify the pillar: "Which pillar does this scenario relate to?"
- Trade-off: "Which solution best balances X and Y?"
- Best practice: "Which design principle applies?"
Example
Question: A company wants to reduce costs while still ensuring 99.99% availability. Which solution fits?
Analysis:
- Cost Optimization: Find ways to reduce costs
- Reliability: High availability is still required
- Trade-off: Use Reserved Instances for the baseline, Spot for bursts
Part 2: Operational Excellence Pillar
1. Definition of Operational Excellence
The ability to run and monitor systems to deliver business value and to continually improve supporting processes and procedures.
4 Focus Areas
- Organization
- Prepare
- Operate
- Evolve
2. Design Principles
1. Perform operations as code
Before (Manual): After (Infrastructure as Code):
- SSH into server - CloudFormation templates
- Manually configure - Terraform
- Document steps - AWS CDK
- Human error prone - Version controlled
- Repeatable
2. Make frequent, small, reversible changes
3. Refine operations procedures frequently
- Regularly review procedures
- Update based on lessons learned
- Conduct game days
4. Anticipate failure
- Pre-mortem exercises
- Test failure scenarios
- Chaos engineering
5. Learn from all operational failures
- Post-incident reviews (PIR)
- Share lessons across teams
- Implement improvements
3. Organization
Team Structure
AWS Services
- AWS Organizations: Manage multiple accounts
- AWS Control Tower: Set up a landing zone
- Service Catalog: Standardized products
4. Prepare
Infrastructure as Code
# CloudFormation Example
AWSTemplateFormatVersion: '2010-09-09'
Resources:
WebServer:
Type: AWS::EC2::Instance
Properties:
InstanceType: t3.micro
ImageId: ami-0123456789abcdef0
Tags:
- Key: Environment
Value: Production
Deployment Strategies
| Strategy | Risk | Rollback Time | Use Case |
|---|---|---|---|
| All-at-once | High | Minutes | Dev/Test |
| Rolling | Medium | Minutes | Production |
| Blue/Green | Low | Seconds | Mission Critical |
| Canary | Very Low | Seconds | High-risk changes |
AWS Services
- CloudFormation: Infrastructure as Code
- AWS CDK: Code-first approach
- CodePipeline: CI/CD
- CodeDeploy: Deployment automation
- Systems Manager: Configuration management
5. Operate
Monitoring Hierarchy
Runbook vs Playbook
| Runbook | Playbook |
|---|---|
| Step-by-step procedures | Decision trees |
| "How to do X" | "When Y happens, do Z" |
| Routine tasks | Incident response |
| Can be automated | May need judgment |
AWS Services for Operations
- CloudWatch: Metrics, Logs, Alarms, Dashboards
- X-Ray: Distributed tracing
- AWS Config: Configuration tracking
- CloudTrail: API logging
- EventBridge: Event routing
- Systems Manager: Operational tasks
6. Evolve
Continuous Improvement Cycle
Metrics to Track
- Deployment frequency: Number of deployments
- Lead time: Time from commit to production
- MTTR: Mean Time To Recovery
- Change failure rate: % of deployments that fail
Game Days
- Simulate failures in controlled environment
- Test runbooks and procedures
- Build team confidence
- Example: Chaos Engineering with AWS Fault Injection Simulator
7. Key AWS Services Summary
| Area | Services |
|---|---|
| Organization | Organizations, Control Tower, Service Catalog |
| Prepare | CloudFormation, CDK, CodePipeline, CodeDeploy |
| Operate | CloudWatch, X-Ray, Config, CloudTrail, SSM |
| Evolve | Well-Architected Tool, Trusted Advisor |
8. Common Exam Questions
Question Type 1: Tool Selection
A company needs to automate deployments with zero downtime. Which service?
- Answer: CodeDeploy with Blue/Green deployment
Question Type 2: Best Practice
How do you ensure consistent configuration across environments?
- Answer: Infrastructure as Code (CloudFormation/CDK)
Question Type 3: Monitoring
You need to trace requests across microservices. Which service?
- Answer: AWS X-Ray
Part 3: Security Pillar
1. Definition of the Security Pillar
The ability to protect data, systems, and assets to take advantage of cloud technologies and improve your security posture.
7 Focus Areas (best practice areas)
- Security Foundations
- Identity and Access Management
- Detection
- Infrastructure Protection
- Data Protection
- Incident Response
- Application Security — integrating security into the development lifecycle: threat modeling, SAST/DAST, dependency checks, security review in CI/CD (e.g. Amazon Inspector code scanning, CodeGuru Security, pipeline gates)
Older versions of the whitepaper had only 6 areas; Application Security was added in recent updates. The exam may still use the old breakdown — know all 7 so you are not caught off guard.
2. Design Principles
1. Implement a strong identity foundation
Best Practice:
- Least privilege access
- Centralized identity management (IAM Identity Center)
- No long-term credentials
- Regular permission review
2. Enable traceability
3. Apply security at all layers
Edge Security → CloudFront, WAF, Shield
Network Security → VPC, Security Groups, NACLs
Compute Security → EC2 Instance Profile, Inspector
Application → Secrets Manager, Parameter Store
Data Security → KMS, S3 Encryption
4. Automate security best practices
- Security as Code
- Automated patching
- Automated response to incidents
- Compliance checks
5. Protect data in transit and at rest
6. Keep people away from data
- Automate processing
- Reduce direct access
- Audit when access is needed
7. Prepare for security events
- Incident response plan
- Regular drills
- Forensic capabilities
3. Security Foundations
Shared Responsibility Model
Account Structure
4. Identity and Access Management
IAM Identity Center (AWS SSO)
Service Control Policies (SCPs)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyRootUser",
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringLike": {
"aws:PrincipalArn": "arn:aws:iam::*:root"
}
}
}
]
}
5. Detection
Detective Controls
| Service | Function |
|---|---|
| GuardDuty | Threat detection using ML |
| Security Hub | Aggregated security findings |
| Detective | Security investigation |
| Inspector | Vulnerability assessment |
| Macie | Sensitive data discovery |
| Config | Configuration compliance |
GuardDuty Findings
Security Hub
6. Infrastructure Protection
Network Security Layers
AWS WAF
7. Data Protection
Encryption Strategy
| Data State | Service | Key Management |
|---|---|---|
| At Rest (S3) | SSE-S3, SSE-KMS | KMS |
| At Rest (EBS) | EBS Encryption | KMS |
| At Rest (RDS) | RDS Encryption | KMS |
| In Transit | TLS 1.2+ | ACM |
AWS KMS
Secrets Management
- Secrets Manager: Automatic rotation, database credentials
- Parameter Store: Configuration, less frequent rotation
8. Incident Response
Response Automation
Part 4: Reliability Pillar
1. Definition of the Reliability Pillar
The ability of a workload to perform its intended function correctly and consistently, and to recover quickly when failures occur.
4 Focus Areas
- Foundations
- Workload Architecture
- Change Management
- Failure Management
2. Design Principles
1. Automatically recover from failure
2. Test recovery procedures
- Chaos Engineering
- Game Days
- Disaster Recovery drills
3. Scale horizontally
4. Stop guessing capacity
- Auto Scaling
- Serverless architectures
- On-demand resources
5. Manage change through automation
- Infrastructure as Code
- CI/CD pipelines
- Automated testing
3. Key Concepts: RTO and RPO
Recovery Time Objective (RTO)
The maximum acceptable time to restore the system after a disaster
Recovery Point Objective (RPO)
The maximum acceptable amount of data loss (measured in time)
RTO/RPO Trade-offs
| Strategy | RTO | RPO | Cost |
|---|---|---|---|
| Backup & Restore | Hours (can be 24h+ depending on data size) | Hours | $ |
| Pilot Light | 10s of minutes | Minutes | $$ |
| Warm Standby | Minutes | Seconds | $$$ |
| Multi-Site Active | Near zero | Near zero | $$$$ |
4. Disaster Recovery Strategies
1. Backup and Restore
2. Pilot Light
3. Warm Standby
4. Multi-Site Active/Active
5. Fault Tolerance Patterns
Circuit Breaker Pattern
Retry with Exponential Backoff
Attempt 1: Wait 1 second
Attempt 2: Wait 2 seconds
Attempt 3: Wait 4 seconds
Attempt 4: Wait 8 seconds
Attempt 5: Wait 16 seconds (+ jitter)
6. AWS Services for Reliability
High Availability
| Service | Purpose |
|---|---|
| ELB | Distribute traffic across AZs |
| Auto Scaling | Maintain desired capacity |
| RDS Multi-AZ | Database failover |
| S3 | 11 9s durability |
| Route 53 | Health checks and failover |
Disaster Recovery
| Service | Purpose |
|---|---|
| AWS Backup | Centralized backup management |
| S3 Cross-Region Replication | Data replication |
| Aurora Global Database | Multi-region database |
| DynamoDB Global Tables | Multi-region NoSQL |
| CloudFormation StackSets | Multi-region deployment |
7. Availability Calculations
SLA and Nines
| Availability | Downtime/Year | Downtime/Month |
|---|---|---|
| 99% (2 nines) | 3.65 days | 7.3 hours |
| 99.9% (3 nines) | 8.76 hours | 43.8 minutes |
| 99.99% (4 nines) | 52.6 minutes | 4.38 minutes |
| 99.999% (5 nines) | 5.26 minutes | 26.3 seconds |
Calculating Composite Availability
Serial Components (both must work):
A1 = 99.9%, A2 = 99.9%
Total = A1 × A2 = 99.8%
Parallel Components (only one must work):
A1 = 99.9%, A2 = 99.9%
Total = 1 - (1-A1) × (1-A2) = 99.9999%
Review Questions
-
How many pillars does the Well-Architected Framework have?
Show answer
6 pillars: Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, and Sustainability (added in 2021). Each pillar has design principles, best practices, and questions in the Well-Architected Tool. SAP-C02 asks about all 6 pillars — Sustainability is the newest pillar, focused on environmental impact.
-
Which pillar was added in 2021?
Show answer
Sustainability pillar — focuses on environmental impacts: minimize energy consumption, increase efficiency, reduce carbon footprint. It includes best practices such as: choosing Regions with renewable energy, right-sizing resources, using managed services and serverless to reduce idle capacity, and optimizing code to reduce CPU/memory usage. Even though it has the fewest questions on SAP, you need to know its principles.
-
Which pillar does "Stop guessing capacity needs" apply to?
Show answer
This is a general design principle of the whole Framework, and at the pillar level it belongs to the Reliability pillar (per the AWS Well-Architected docs — see the Reliability Design Principles in Part 4 of this lesson). Instead of over-provisioning "just in case", use Auto Scaling and serverless to scale to actual demand — no guessing capacity. The concept is related to Cost Optimization (not paying for unused capacity) but it is not Performance Efficiency — that pillar's principles are: democratize advanced technologies, go global in minutes, use serverless architectures, experiment more often, mechanical sympathy.
-
What is the Well-Architected Tool used for?
Show answer
To evaluate workloads against AWS best practices through a questionnaire (~60+ questions across the pillars). The tool generates a report with: HRIs (High Risk Items), MRIs (Medium Risk Items), and an improvement plan with concrete actions. You can save milestones (before/after improvements), share with AWS Solutions Architects for review, and integrate with Trusted Advisor. It is free in the AWS Console.
-
Name 3 specialized lenses.
Show answer
There are many lenses; common examples: Serverless Application Lens (Lambda, API GW, DynamoDB patterns), Machine Learning Lens (ML workload best practices), SaaS Lens (multi-tenant architectures), IoT Lens, HPC Lens, Data Analytics Lens, Financial Services Lens. Lenses add best practices for specific domains on top of the foundation of the 6 core pillars.
-
What does "Perform operations as code" mean?
Show answer
All infrastructure and operations are defined as code (Infrastructure as Code): CloudFormation, CDK, Terraform. Operations tasks such as patching, scaling, and incident response are also codified through SSM Automation, Lambda, and EventBridge rules. Benefits: reproducible, version-controlled, testable, auditable, peer-reviewable. It eliminates manual operations that are prone to human error.
-
What is the difference between a Runbook and a Playbook?
Show answer
Runbook: a step-by-step guide for a specific routine operational task (restart a service, disk cleanup, backup verification). Playbook: a guide for incident response — when an incident happens (production down, security breach), the playbook guides investigation and remediation. Runbooks are for proactive/planned work; Playbooks are for reactive/unplanned work. Both should be automated where possible (SSM Automation).
-
What are the advantages of Blue/Green deployment?
Show answer
(1) Zero-downtime deployment — swap traffic from Blue (current) to Green (new) instantly, (2) Instant rollback — if Green has problems, switch traffic back to Blue within seconds, (3) Testing Green with real traffic (a small %) before full cutover, (4) Production validation without affecting users. AWS support: ALB listener rules, Route 53 weighted routing, CodeDeploy Blue/Green, Elastic Beanstalk. Cost: you need double the resources during the deployment.
-
Which AWS service is used for distributed tracing?
Show answer
AWS X-Ray — instrument applications to trace requests across microservices, Lambda, API GW, DynamoDB. The X-Ray SDK generates trace IDs, segments, and subsegments. The Service Map visualizes dependencies and bottlenecks. Cold start detection, latency percentiles, error rates per service. Combine it with CloudWatch Container Insights for ECS/EKS observability. CloudWatch Application Insights also detects anomalies automatically.
-
What are Game Days used for?
Show answer
Chaos engineering / disaster simulations in a controlled environment. The team simulates failures (AZ outage, database failure, network partition, high CPU) to test: (1) whether recovery procedures and runbooks work correctly, (2) whether monitoring and alerts fire correctly, (3) team response time and coordination, (4) whether the infrastructure actually recovers as designed. Result: identify gaps before a real production incident happens. AWS Fault Injection Service (FIS) is the tool for Game Days.
- Shared Responsibility Model: what is AWS responsible for?
Show answer
AWS is responsible for "Security OF the cloud": physical security of data centers, hardware, network infrastructure, hypervisor/host OS, managed service software. The customer is responsible for "Security IN the cloud": OS (patching, updates), applications, data (encryption, access), network configuration (SG, NACL), IAM (users, roles, policies). The shared model varies by service type: IaaS (EC2) → more on the customer; SaaS/Managed (RDS, Lambda) → more on AWS.
- How does GuardDuty differ from Security Hub?
Show answer
GuardDuty: threat detection service — analyzes VPC Flow Logs, DNS, and CloudTrail to find anomalies and known threats (compromised credentials, coin mining, port scanning). It generates findings itself. Security Hub: aggregation and compliance service — collects findings from GuardDuty, Inspector, Macie, Config, IAM Access Analyzer, and third-party tools into one dashboard. GuardDuty detects threats; Security Hub consolidates and prioritizes across services.
- Why should you use IAM Identity Center instead of IAM users?
Show answer
IAM Identity Center (SSO) provides: (1) Centralized access to many AWS accounts from one portal — no separate IAM users per account, (2) Integration with an existing IdP (Active Directory, Okta, Azure AD) — use corporate credentials, (3) Consistent MFA and access policies across the organization, (4) Temporary credentials automatically — no long-term access keys to manage, (5) a centralized audit trail. IAM users per account = messy with 100+ accounts.
- What types of attacks can WAF block?
Show answer
WAF blocks Layer 7 attacks: SQL injection, XSS (Cross-Site Scripting), CSRF, HTTP floods, bad bots, request smuggling. Use managed rule groups (AWS or third-party) or custom rules. Rate-based rules block volumetric Layer 7 DDoS. Geo-blocking by country. IP reputation lists. WAF does not protect Layer 3/4 (volumetric DDoS) — you need Shield for that. WAF is deployed on CloudFront, ALB, API GW, AppSync, Cognito.
- How does Secrets Manager differ from Parameter Store?
Show answer
Secrets Manager: automatic rotation of secrets (built-in support for RDS, Redshift, DocumentDB, custom Lambda rotator), costs $0.40/secret/month. Parameter Store: no built-in auto-rotation, free (Standard tier), simple key-value. Use Secrets Manager for database credentials that need rotation; Parameter Store for application config, feature flags, non-rotating secrets. Lambda and ECS integrate well with both.
- What is the difference between RTO and RPO?
Show answer
RTO (Recovery Time Objective): the maximum allowed time from when a disaster occurs until the service is running again — "maximum acceptable downtime". RPO (Recovery Point Objective): the maximum amount of data loss you can accept — "maximum acceptable data loss". Example: RTO 1 hour = must be back online within 1 hour; RPO 15 minutes = back up every 15 minutes, accept losing at most 15 minutes of data. Lower RTO = more expensive (Warm Standby/Active-Active); lower RPO = more expensive sync replication.
- What are the 4 DR strategies, ordered by cost from lowest to highest?
Show answer
From cheapest → most expensive: (1) Backup & Restore — back up to S3/Glacier, restore when needed, RTO hours to days, (2) Pilot Light — core DB running, compute off, RTO minutes to hours, (3) Warm Standby — scaled-down production running, RTO minutes, (4) Multi-Site Active-Active — full production in both regions, RTO ~0. Correlation: lower cost = higher RTO/RPO.
- How does Pilot Light differ from Warm Standby?
Show answer
Pilot Light: only core components run in the DR region — usually just database replication (RDS cross-region replica, DynamoDB Global Tables). Compute (EC2, ECS) is off — it has to be launched/scaled at failover. Warm Standby: a scaled-down production is running — both compute and database, but with less capacity (e.g. 10% of production scale). Warm Standby fails over faster (just scale up); Pilot Light is cheaper (no paying for idle compute).
- What problem does the Circuit Breaker pattern solve?
Show answer
It prevents cascading failures in microservices. When service A keeps failing while calling service B (which is slow/down), the Circuit Breaker "opens" — it stops calling B and returns a fallback response immediately. After a timeout, it tries "half-open" — some requests go to B. If they succeed → it "closes" back to normal; if they still fail → it "opens" again. AWS App Mesh, Resilience4j, and AWS SDK retry mechanisms implement circuit breakers. It prevents B's slowness from making A slow too and exhausting its thread pool.
- How do you calculate the availability of 2 components running in parallel?
Show answer
Parallel (redundant) components: Availability = 1 - (1-A1) × (1-A2). Example: 2 EC2 instances, each 99% available → 1 - (1-0.99)² = 1 - 0.0001 = 99.99%. Series components: A_total = A1 × A2 (every component must work). This is why Multi-AZ increases availability: the probability of both AZs failing at the same time is very low. Adding AZs → availability approaches 100%.
Hands-on Exercises
Part 1: AWS Well-Architected Framework Overview
- Open the Well-Architected Tool in the AWS Console
- Read the Well-Architected Framework Whitepaper
- Browse a Lens (e.g. Serverless Lens)
Part 2: Operational Excellence Pillar
- Create a simple CloudFormation stack
- Set up a CloudWatch Dashboard
- Create a CloudWatch Alarm for EC2 CPU
- Explore AWS Systems Manager features
Part 3: Security Pillar
- Enable GuardDuty in your account
- Set up Security Hub
- Create a KMS key and encrypt an S3 bucket
- Configure WAF with managed rules
Part 4: Reliability Pillar
- Set up RDS Multi-AZ
- Configure S3 Cross-Region Replication
- Create an Auto Scaling Group with health checks
- Test failover scenarios
References
- AWS Well-Architected Framework
- Well-Architected Tool
- Well-Architected Lenses
- Well-Architected Labs
- Operational Excellence Pillar
- AWS CloudFormation
- AWS Systems Manager
- Amazon CloudWatch
- AWS X-Ray
- Security Pillar
- Security pillar — 7 best practice areas (including Application security)
- AWS KMS concepts — KMS keys (the term that replaces "CMK")
- AWS KMS Developer Guide
- AWS WAF Developer Guide
- Amazon GuardDuty
- Reliability Pillar
- AWS Backup
- Amazon Route 53
- Elastic Load Balancing
- AWS Fault Injection Simulator