devHọc Dev

Week 1 - Day 3: Well-Architected Overview, Operational Excellence, Security and Reliability

Week 1 – Day 3

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

┌─────────────────────────────────────────────────────────────────┐│WELL-ARCHITECTEDFRAMEWORK│├─────────────┬─────────────┬─────────────┬─────────────┬─────────┤│Operational│Security│Reliability│Performance│Cost││Excellence│││Efficiency│Optimize│├─────────────┴─────────────┴─────────────┴─────────────┴─────────┤│Sustainability│└─────────────────────────────────────────────────────────────────┘

Overview of the 6 Pillars

PillarFocusKey Question
Operational ExcellenceRunning and monitoring systems"How do we operate efficiently?"
SecurityProtecting data and systems"How do we stay secure?"
ReliabilityRecovering from failures"How do we ensure uptime?"
Performance EfficiencyUsing resources efficiently"How do we achieve performance?"
Cost OptimizationAvoiding unnecessary costs"How do we save money?"
SustainabilityReducing environmental impact"How do we stay sustainable?"

3. General Design Principles

1. Stop guessing capacity needs

Before:After:┌─────────────┐┌─────────────┐│PeakLoad││AutoScale││████████││████││████████│──────────►│████████││Wasted$$││████│└─────────────┘└─────────────┘ProvisionUsewhatforpeakyouneed

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

MoreSecurityLayers=HigherLatency┌──────────┐┌──────────┐┌──────────┐┌──────────┐│WAF│──►│ALB│──►│EC2│──►│RDS│└──────────┘└──────────┘└──────────┘└──────────┘+2ms+1ms+1ms+1msTotal:+5msTrade-off:Accepthigherlatencyinexchangeforbettersecurity

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

  1. Define the workload in the AWS Console
  2. Answer the questions for each pillar
  3. Review the identified risks
  4. Create an improvement plan
  5. Track progress over time

Workflow

DefineWorkload──►AnswerQuestions──►ReviewRisks│││▼│GenerateImprovementPlan││└──────────────────────────────────────┘TrackProgress

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

  1. Identify the pillar: "Which pillar does this scenario relate to?"
  2. Trade-off: "Which solution best balances X and Y?"
  3. 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

  1. Organization
  2. Prepare
  3. Operate
  4. 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

BigBangRelease:SmallIncrementalChanges:┌────────────────┐┌──┐┌──┐┌──┐┌──┐│││││││││││LargeChange│vs│v1││v2││v3││v4│││││││││││└────────────────┘└──┘└──┘└──┘└──┘HighRiskLowRiskEach

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

┌─────────────────────────────────────────────┐│ProductTeam││┌─────────┐┌─────────┐┌─────────┐│││Dev││Ops││Security│││││││││││└────┬────┘└────┬────┘└────┬────┘││└────────────┼────────────┘│││││SharedResponsibility│└─────────────────────────────────────────────┘

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

StrategyRiskRollback TimeUse Case
All-at-onceHighMinutesDev/Test
RollingMediumMinutesProduction
Blue/GreenLowSecondsMission Critical
CanaryVery LowSecondsHigh-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

┌─────────────────────────────────────────────────┐│CloudWatch││┌─────────────┐┌─────────────┐┌─────────┐│││Metrics││Logs││Alarms││││││││││││CPU,Memory││AppLogs││>80%CPU││││Disk,Net││AccessLogs││Errors│││└─────────────┘└─────────────┘└─────────┘│││││││└────────────────┼───────────────┘││▼││┌─────────────┐│││Dashboards│││└─────────────┘│└─────────────────────────────────────────────────┘

Runbook vs Playbook

RunbookPlaybook
Step-by-step proceduresDecision trees
"How to do X""When Y happens, do Z"
Routine tasksIncident response
Can be automatedMay 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

┌──────────────┐│Measure│└──────┬───────┘│▼┌──────────────┐│Analyze│└──────┬───────┘│▼┌──────────────┐│Improve│└──────┬───────┘│└──────────────┐│┌──────────────┐││Measure│◄─────┘└──────────────┘

Metrics to Track

  1. Deployment frequency: Number of deployments
  2. Lead time: Time from commit to production
  3. MTTR: Mean Time To Recovery
  4. 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

AreaServices
OrganizationOrganizations, Control Tower, Service Catalog
PrepareCloudFormation, CDK, CodePipeline, CodeDeploy
OperateCloudWatch, X-Ray, Config, CloudTrail, SSM
EvolveWell-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)

  1. Security Foundations
  2. Identity and Access Management
  3. Detection
  4. Infrastructure Protection
  5. Data Protection
  6. Incident Response
  7. 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

┌─────────────────────────────────────────────┐│Logging&Monitoring││┌───────────┐┌───────────┐┌─────────┐│││CloudTrail││VPCFlow││Config││││││Logs││││││APIcalls││Network││Changes│││└─────┬─────┘└─────┬─────┘└────┬────┘││└──────────────┼─────────────┘││▼││┌─────────────────┐│││Centralized││││LogAnalysis││││(CloudWatch)│││└─────────────────┘│└─────────────────────────────────────────────┘

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

InTransit:AtRest:┌─────────┐┌─────────┐│TLS││KMS││1.2/1.3││Keys│└─────────┘└─────────┘││HTTPSEncryptedVPN/IPSecStorage

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

┌─────────────────────────────────────────────┐│CustomerResponsibility││(SecurityINtheCloud)││-CustomerData││-Platform,Applications,IAM││-OperatingSystem,NetworkConfig││-Client-side&Server-sideEncryption│├─────────────────────────────────────────────┤│AWSResponsibility││(SecurityOFtheCloud)││-Hardware,Software,Networking││-Compute,Storage,Database,Networking││-Regions,AZs,EdgeLocations│└─────────────────────────────────────────────┘

Account Structure

┌─────────────────┐│Management││Account│└────────┬────────┘│┌────────────────────┼────────────────────┐│││▼▼▼┌──────────────┐┌──────────────┐┌──────────────┐│Security││Production││Dev││Account││Account││Account││││││││-GuardDuty││-Workloads││-Sandbox││-Security││-Data││-Testing││Hub│││││└──────────────┘└──────────────┘└──────────────┘

4. Identity and Access Management

IAM Identity Center (AWS SSO)

┌────────────────────────────────────────┐│IAMIdentityCenter││││┌──────────────┐┌──────────────┐│││Built-in││External││││Directory││IdP││││││(Okta,AD)│││└──────┬───────┘└──────┬───────┘││└──────────────────┘│││││▼││┌──────────────────┐│││PermissionSets││││(Roles)│││└──────────────────┘│││││┌───────────────┼───────────────┐││▼▼▼││Account1Account2AccountN│└────────────────────────────────────────┘

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

ServiceFunction
GuardDutyThreat detection using ML
Security HubAggregated security findings
DetectiveSecurity investigation
InspectorVulnerability assessment
MacieSensitive data discovery
ConfigConfiguration compliance

GuardDuty Findings

FindingTypes:├──EC2Findings│├──UnauthorizedAccess:EC2/SSHBruteForce│└──CryptoCurrency:EC2/BitcoinTool.B├──S3Findings│├──Policy:S3/AccountBlockPublicAccessDisabled│└──Exfiltration:S3/ObjectRead.Unusual└──IAMFindings├──Persistence:IAMUser/AnomalousBehavior└──UnauthorizedAccess:IAMUser/MaliciousIPCaller

Security Hub

┌─────────────────┐│SecurityHub│└────────┬────────┘│┌──────────────┬─────────┼─────────┬──────────────┐│││││▼▼▼▼▼┌─────────┐┌─────────┐┌────────┐┌────────┐┌────────┐│GuardDuty││Inspector││Macie││Config││Firewall││││││││││Manager│└─────────┘└─────────┘└────────┘└────────┘└────────┘Standards:-AWSFoundationalSecurityBestPractices-CISAWSFoundationsBenchmark-PCIDSS

6. Infrastructure Protection

Network Security Layers

┌─────────────────────────────────────────────────────┐│Internet│└───────────────────────┬─────────────────────────────┘│▼┌─────────────────────────────────────────────────────┐│EdgeLayer:CloudFront+WAF+Shield│└───────────────────────┬─────────────────────────────┘│▼┌─────────────────────────────────────────────────────┐│VPCLayer:InternetGateway│└───────────────────────┬─────────────────────────────┘│▼┌─────────────────────────────────────────────────────┐│SubnetLayer:NACL(Stateless)│└───────────────────────┬─────────────────────────────┘│▼┌─────────────────────────────────────────────────────┐│InstanceLayer:SecurityGroups(Stateful)│└─────────────────────────────────────────────────────┘

AWS WAF

WAFRules:├──ManagedRules(AWS,Marketplace)│├──Commonvulnerabilities│├──Knownbadinputs│└──SQLinjection,XSS└──CustomRules├──Ratelimiting├──Geoblocking└──IPwhitelist/blacklist

7. Data Protection

Encryption Strategy

Data StateServiceKey Management
At Rest (S3)SSE-S3, SSE-KMSKMS
At Rest (EBS)EBS EncryptionKMS
At Rest (RDS)RDS EncryptionKMS
In TransitTLS 1.2+ACM

AWS KMS

KeyHierarchy:┌─────────────────────────────────────┐│KMSkey(customermanagedkey)││(keymaterialneverleavesKMS)│└─────────────────┬───────────────────┘││Encrypts▼┌─────────────────────────────────────┐│DataEncryptionKey││(DEK)│└─────────────────┬───────────────────┘││Encrypts▼┌─────────────────────────────────────┐│YourData│└─────────────────────────────────────┘

Secrets Management

  • Secrets Manager: Automatic rotation, database credentials
  • Parameter Store: Configuration, less frequent rotation

8. Incident Response

Response Automation

Detection→Analysis→Containment(GuardDuty)(Detective)(Lambda+SSM)│││└───────────────────────┴────────────────────┘│EventBridgeRules│▼AutomatedResponse-Isolateinstance-Revokecredentials-Captureforensics

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

  1. Foundations
  2. Workload Architecture
  3. Change Management
  4. Failure Management

2. Design Principles

1. Automatically recover from failure

┌─────────────┐HealthCheckFailed┌─────────────┐│Healthy│────────────────────────►│Unhealthy││Instance││Instance│└─────────────┘└──────┬──────┘│▼┌─────────────┐│AutoScale││Replace│└─────────────┘

2. Test recovery procedures

  • Chaos Engineering
  • Game Days
  • Disaster Recovery drills

3. Scale horizontally

VerticalScaling:HorizontalScaling:┌─────────────────┐┌─────┐┌─────┐┌─────┐│││││││││BigServer│vs│Small││Small││Small│││││││││└─────────────────┘└─────┘└─────┘└─────┘SinglepointDistributedoffailureNoSPOF

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)

Disaster│◄───────────────────┼───────────────────►││││RPO│RTO││DataLoss│Downtime││││▼▼▼LastBackupDisasterServiceOccursRestored

RTO/RPO Trade-offs

StrategyRTORPOCost
Backup & RestoreHours (can be 24h+ depending on data size)Hours$
Pilot Light10s of minutesMinutes$$
Warm StandbyMinutesSeconds$$$
Multi-Site ActiveNear zeroNear zero$$$$

4. Disaster Recovery Strategies

1. Backup and Restore

┌─────────────────────────────────────────────────────────┐│PrimaryRegion││┌─────────┐┌─────────┐┌─────────┐│││EC2││RDS││S3│││└────┬────┘└────┬────┘└────┬────┘││││││││Backup│Cross-region││││replication│└───────┼─────────────┼─────────────┼─────────────────────┘│││▼▼▼┌─────────────────────────────────────────────────────────┐│DRRegion││┌─────────────────────────────┐│││AMIs&Snapshots││││S3BackupData│││└─────────────────────────────┘││││[Nothingrunning-lowestcost]│└─────────────────────────────────────────────────────────┘RTO:Hours|RPO:Hours|Cost:$

2. Pilot Light

┌─────────────────────────────────────────────────────────┐│PrimaryRegion││┌─────────┐┌─────────┐┌─────────┐│││Web/App││DB││S3││││(ON)││(ON)│││││└─────────┘└────┬────┘└─────────┘│││││Replication│└─────────────────────┼───────────────────────────────────┘│▼┌─────────────────────────────────────────────────────────┐│DRRegion││┌─────────┐┌─────────┐┌─────────┐│││Web/App││DB││S3││││(OFF)││(ON-││Synced││││││Read)│││││└─────────┘└─────────┘└─────────┘││││[OnlyDBrunning-mediumcost]│└─────────────────────────────────────────────────────────┘RTO:10sminutes|RPO:Minutes|Cost:$$

3. Warm Standby

┌─────────────────────────────────────────────────────────┐│PrimaryRegion││┌─────────┐┌─────────┐┌─────────┐│││Web/App││DB││S3││││(ON)││(ON)││││││FULL││Primary│││││└─────────┘└────┬────┘└─────────┘│││││Replication│└─────────────────────┼───────────────────────────────────┘│▼┌─────────────────────────────────────────────────────────┐│DRRegion││┌─────────┐┌─────────┐┌─────────┐│││Web/App││DB││S3││││(ON)││Standby││Synced││││MINIMAL││(ON)│││││└─────────┘└─────────┘└─────────┘││││[Scaled-downversionrunning]│└─────────────────────────────────────────────────────────┘RTO:Minutes|RPO:Seconds|Cost:$$$

4. Multi-Site Active/Active

┌─────────────────────────────────────────────────────────┐│RegionA││┌─────────┐┌─────────┐┌─────────┐│││Web/App││DB││S3││││(ON)││(ON)│◄─►│Synced││││FULL││Primary│││││└─────────┘└────┬────┘└─────────┘│└─────────────────────┼───────────────────────────────────┘▲│▲│Bi-directional│Route53ReplicationRoute53WeightedWeighted│││▼▼▼┌─────────────────────────────────────────────────────────┐│RegionB││┌─────────┐┌─────────┐┌─────────┐│││Web/App││DB││S3││││(ON)││(ON)│◄─►│Synced││││FULL││Primary│││││└─────────┘└─────────┘└─────────┘│└─────────────────────────────────────────────────────────┘RTO:Nearzero|RPO:Nearzero|Cost:$$$$

5. Fault Tolerance Patterns

Circuit Breaker Pattern

NormalFailuresDetectedRecovery│││▼▼▼┌────────┐┌────────┐┌────────┐│CLOSED│────────────►│OPEN│───────────►│HALF│││threshold││timeout│OPEN││Allow│exceeded│Block││Test││calls││calls││calls│└────────┘└────────┘└───┬────┘│┌─────────────────────────┤││SuccessFailure││▼▼┌────────┐┌────────┐│CLOSED││OPEN│└────────┘└────────┘

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

ServicePurpose
ELBDistribute traffic across AZs
Auto ScalingMaintain desired capacity
RDS Multi-AZDatabase failover
S311 9s durability
Route 53Health checks and failover

Disaster Recovery

ServicePurpose
AWS BackupCentralized backup management
S3 Cross-Region ReplicationData replication
Aurora Global DatabaseMulti-region database
DynamoDB Global TablesMulti-region NoSQL
CloudFormation StackSetsMulti-region deployment

7. Availability Calculations

SLA and Nines

AvailabilityDowntime/YearDowntime/Month
99% (2 nines)3.65 days7.3 hours
99.9% (3 nines)8.76 hours43.8 minutes
99.99% (4 nines)52.6 minutes4.38 minutes
99.999% (5 nines)5.26 minutes26.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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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).

  8. 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.

  9. 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.

  10. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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).

  1. 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.

  1. 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


Next lesson →