devHọc Dev

Week 1 - Day 4: Well-Architected Performance Efficiency, Cost Optimization and Sustainability

Week 1 – Day 4

This lesson combines 3 topics: Performance Efficiency Pillar, Cost Optimization Pillar, Sustainability Pillar.

Learning Objectives

  • Understand the design principles of Performance Efficiency
  • Master the 5 focus areas and the selection strategies for resources
  • Know how to optimize performance on AWS
  • Understand the design principles of Cost Optimization
  • Master the pricing models and how to optimize them
  • Know the tools and techniques for managing costs
  • Understand the design principles of the Sustainability Pillar and its place among the 6 pillars
  • Recognize patterns that reduce environmental impact: Graviton, serverless, lifecycle, region selection
  • Know the measurement tools (Customer Carbon Footprint Tool, Compute Optimizer) and the related exam keywords

Part 1: Performance Efficiency Pillar

1. Definition of the Performance Efficiency Pillar

The ability to use computing resources efficiently to meet system requirements, and to maintain that efficiency as demand changes and technologies evolve.

5 Focus Areas (best practice areas, current whitepaper)

  1. Architecture selection — choose suitable patterns and services (evaluate options, use managed services, decide based on data/benchmarks)
  2. Compute and hardware — instance type/family, Graviton, accelerators, container vs serverless, elasticity
  3. Data management — choose data stores by access pattern (relational, key-value, in-memory, analytics), caching, partitioning
  4. Networking and content delivery — location (Region, Local Zones), CloudFront, Global Accelerator, protocols, load balancing
  5. Process and culture — performance KPIs, load testing, monitoring, periodic review when new services/instances appear

The old whitepaper split this into Selection / Review / Monitoring / Trade-offs. Those ideas still exist but have been folded into the 5 areas above (Review and Monitoring sit in Process and culture; Trade-offs are spread around, especially in Data management with caching and consistency).

2. Design Principles

1. Democratize advanced technologies

Before:                         After (AWS):
- Hire ML experts               - Use SageMaker
- Build infrastructure          - Use managed services
- Maintain and update           - AWS handles it

→ Focus on business value, not infrastructure

2. Go global in minutes

Deploygloballywithafewclicks:┌─────────────┐┌─────────────┐┌─────────────┐│us-east-1││eu-west-1││ap-southeast││┌───┐││┌───┐││┌───┐│││App││││App││││App│││└───┘││└───┘││└───┘│└─────────────┘└─────────────┘└─────────────┘│││└───────────────┴───────────────┘│CloudFrontCDN│EndUsers

3. Use serverless architectures

  • No server management
  • Automatic scaling
  • Pay for value

4. Experiment more often

  • Easy to test new configurations
  • A/B testing
  • Compare performance

5. Consider mechanical sympathy

Understand how resources work so you can use them most effectively

Examples:

  • SSD vs HDD for random I/O
  • GPU vs CPU for ML workloads
  • Memory-optimized vs Compute-optimized

3. Compute Selection

Decision Tree

┌─────────────────┐│Computeneeded?│└────────┬────────┘│┌─────────────────┼─────────────────┐│││▼▼▼┌──────────┐┌──────────┐┌──────────┐│Virtual││Container││Serverless││Machines│││││└────┬─────┘└────┬─────┘└────┬─────┘│││▼▼▼EC2,LightsailECS,EKS,Lambda,FargateFargate

EC2 Instance Type Selection

WorkloadInstance FamilyWhy
Web serversM (General)Balanced
Batch processingC (Compute)High CPU
In-memory cacheR (Memory)High RAM
Data warehouseI (Storage)High I/O
Machine LearningP, GGPU
Variable loadT (Burstable)Cost-effective

Lambda Optimization

Memory↑=CPU↑=Cost↑=Duration↓┌─────────────────────────────────────────────┐│Memory:128MB→Duration:10s→Cost:$X││Memory:512MB→Duration:3s→Cost:$X││Memory:1024MB→Duration:1.5s→Cost:$X│└─────────────────────────────────────────────┘→Testtofindoptimalmemorysetting→UseAWSLambdaPowerTuning

4. Storage Selection

Storage Decision Matrix

CharacteristicS3EBSEFSFSx
AccessObjectBlockFileFile
Latencymssub-msmssub-ms
Durability11 9s99.999%11 9svaries
SharingUnlimitedSingle EC2Multi EC2Multi EC2

EBS Volume Types

PerformanceRequirements:HighIOPS(Database):├──io2(BlockExpress):Upto256,000IOPS,4,000MiB/s,64TiB│(since04/2025everyio2volumeisBlockExpress—nomore"regulario2")└──io1:Upto64,000IOPS,1,000MiB/s,16TiBHighThroughput(BigData):├──st1:Upto500MB/s└──sc1:Upto250MB/sGeneralPurpose:└──gp3:Upto80,000IOPS,2,000MiB/s,64TiB(09/2025)

S3 Performance Optimization

Baseline: 3,500 PUT + 5,500 GET per prefix per second

Strategies:
1. Use multiple prefixes
   bucket/images/user1/
   bucket/images/user2/
   → Each prefix = separate throughput

2. S3 Transfer Acceleration
   → Use CloudFront edge for uploads

3. Multi-part upload
   → Parallel upload chunks

4. Byte-range fetches
   → Parallel download chunks

5. Database Selection

Database Decision Tree

┌─────────────────┐│DataStructure│└────────┬────────┘│┌───────────────────┼───────────────────┐│││▼▼▼RelationalKey-ValueDocument│││▼▼▼RDS,AuroraDynamoDBDocumentDB

Database Performance Patterns

PatternSolutionUse Case
Read replicasAurora, RDSRead-heavy
CachingElastiCacheFrequent reads
ShardingDynamoDBHigh throughput
Connection poolingRDS ProxyMany connections

Caching Strategy

┌─────────────────────────────────────────────┐│Cache-AsidePattern││││Application││││││1.Readfromcache││▼││┌────────┐Miss┌────────┐│││Cache│────────►│Database││││(Redis)│2.Read└───┬────┘││└────────┘│││▲│3.Returndata││││││└──────────────────┘││4.Storeincache│└─────────────────────────────────────────────┘

6. Network Selection

CloudFront Optimization

UserRequest│▼EdgeLocation(closest)│├──CacheHit?→Returncachedcontent│└──CacheMiss→OriginFetch│┌─────┴─────┐││S3OriginCustomOrigin(ALB,EC2)

Global Accelerator vs CloudFront

FeatureCloudFrontGlobal Accelerator
ContentStatic + DynamicTCP/UDP traffic
CachingYesNo
Use caseWeb contentGaming, IoT, VoIP
Entry pointsEdge locationsEdge locations

VPC Optimization

Within Region:
- Use VPC Endpoints for AWS services
- Avoid NAT Gateway when possible
- Use Placement Groups for low latency

Cross Region:
- Use Transit Gateway
- Consider AWS backbone vs internet

7. Monitoring Performance

Key Metrics

LayerMetrics
ComputeCPU, Memory, Network
StorageIOPS, Throughput, Latency
DatabaseConnections, Query time
NetworkLatency, Packet loss
ApplicationResponse time, Error rate

CloudWatch Dashboards

┌─────────────────────────────────────────────┐│PerformanceDashboard│├──────────────┬──────────────┬───────────────┤│EC2CPU│RDSIOPS│ALBLatency││████████│████│████████││70%│5000│150ms│├──────────────┼──────────────┼───────────────┤│Lambda│S3Requests│CloudFront││Duration││HitRatio││████│████████│████████████││200ms│10K/min│95%│└──────────────┴──────────────┴───────────────┘

8. Trade-offs

Performance vs Cost

Higher Performance = Higher Cost

Example decisions:
- Provisioned IOPS vs GP3
- Reserved capacity vs On-demand
- More memory (Lambda) vs longer duration

Consistency vs Latency

Strong Consistency:
- Higher latency
- Data always current
- Example: Financial transactions

Eventual Consistency:
- Lower latency
- Data may be stale
- Example: Social media feeds

Part 2: Cost Optimization Pillar

1. Definition of the Cost Optimization Pillar

The ability to run systems that deliver business value at the lowest price point.

5 Focus Areas

  1. Practice Cloud Financial Management
  2. Expenditure and Usage Awareness
  3. Cost-Effective Resources
  4. Manage Demand and Supply Resources
  5. Optimize Over Time

2. Design Principles

1. Implement Cloud Financial Management

TraditionalIT:Cloud:┌─────────────────┐┌─────────────────┐│CapExupfront││OpExmonthly││Fixedcapacity││Variable││Longplanning││Agile│└─────────────────┘└─────────────────┘→Newskillsneeded:FinOps

2. Adopt a consumption model

Payonlyforwhatyouuse:On-Premises:AWS:┌────────────────┐PeakTraffic│████████████████│┌───┐│████████████████││││████████████████│→││AutoScale│████████████████│││││Idlecapacity│└───┘│└────────────────┘└───────┘AlwayspayingPayperuse

3. Measure overall efficiency

Business Metrics:
- Cost per transaction
- Cost per user
- Cost per revenue dollar

Not just:
- Total AWS bill

4. Stop spending money on undifferentiated heavy lifting

BuildvsBuy:┌───────────────────────────────────────────────┐│Don'tBuild:│Build:││-Databaseengines│-Businesslogic││-MLplatforms│-Uniquefeatures││-Monitoringtools│-Competitive││-Securitytools│advantages│└───────────────────────────────────────────────┘

5. Analyze and attribute expenditure

TaggingStrategy:┌─────────────────────────────────────────────┐│ResourceTags││││Environment:Production││Project:WebApp││CostCenter:Engineering││Owner:team-a@company.com│└─────────────────────────────────────────────┘→Enablecostallocationbytags→Generatereportsperproject/team

3. AWS Pricing Models Deep Dive

EC2 Pricing Comparison

Cost Comparison (illustrative, rounded — % of On-Demand):

On-Demand:          ████████████████████████  100%
1yr Standard RI:    ███████████████           ~60%  (~40% off)
3yr Standard RI:    ███████                   ~28%  (up to 72% off)
Compute SP (3yr):   ████████                  ~34%  (up to 66% off)
Spot Instance:      ███                       ~10-30% (up to 90% off)

These numbers are used consistently across the course — details in Week 3 Day 1 (Part 1).

Reserved Instance vs Savings Plans

AspectReserved InstanceSavings Plans
CommitmentSpecific instance$ amount/hour
FlexibilityLimitedHigh
ServicesEC2, RDS, etc.EC2, Lambda, Fargate
DiscountUp to 72%Up to 72%
Best forStable workloadsFlexible workloads

Savings Plans Types

Compute Savings Plans:
- Most flexible
- Apply to EC2, Lambda, Fargate
- Any region, instance family, OS
- Up to 66% discount

EC2 Instance Savings Plans:
- Specific instance family in a region
- Any size, tenancy, OS within family
- Up to 72% discount

SageMaker Savings Plans:
- Specific to SageMaker
- Up to 64% discount

Spot Instances Strategies

Strategy0:price-capacity-optimized(AWSRECOMMENDED)-Picksthepoolswiththemostavailablecapacity,thenthecheapestamongthem-Balancespriceandinterruptionrisk→thedefaultyoushouldchoose-(detailsonthe5allocationstrategiesinWeek3Day1,Part1)Strategy1:DiversifiedAllocation┌─────────────────────────────────────────────┐│SpotFleet││││c5.large(30%)││c5.xlarge(20%)││m5.large(25%)││m5.xlarge(25%)││││→Reducesinterruptionrisk│└─────────────────────────────────────────────┘Strategy2:Capacity-Optimized-AWSselectspoolswithmostcapacity-LowerchanceofinterruptionStrategy3:LowestPrice-Lowestcostbuthigherinterruptionrisk

4. Storage Cost Optimization

S3 Cost Analysis

Storage Costs (per GB/month, us-east-1):
Standard:            $0.023  ████████████████████████
Intelligent-Tiering: $0.023  ████████████████████████ (auto-optimize)
Standard-IA:         $0.0125 █████████████
One Zone-IA:         $0.01   ██████████
Glacier Instant:     $0.004  ████
Glacier Flexible:    $0.0036 ███
Glacier Deep:        $0.00099 █

S3 Lifecycle Optimization

{
  "Rules": [{
    "ID": "Optimize-Costs",
    "Status": "Enabled",
    "Transitions": [
      {"Days": 30, "StorageClass": "STANDARD_IA"},
      {"Days": 90, "StorageClass": "GLACIER"},
      {"Days": 365, "StorageClass": "DEEP_ARCHIVE"}
    ],
    "NoncurrentVersionTransitions": [
      {"NoncurrentDays": 30, "StorageClass": "GLACIER"}
    ],
    "NoncurrentVersionExpiration": {
      "NoncurrentDays": 90
    }
  }]
}

EBS Cost Optimization

gp2vsgp3:┌─────────────────────────────────────────────┐│gp2(100GB):││$10/month+IOPStiedtosize││││gp3(100GB):││$8/month+independentIOPSconfig││││→gp3is20%cheaperbaseline││→gp3allowsmoreIOPSwithoutmorestorage│└─────────────────────────────────────────────┘Actions:-Migrategp2→gp3-DeleteunusedEBSvolumes-Deleteoldsnapshots

5. Database Cost Optimization

RDS Optimization

1. Right-size instances
   - Use Performance Insights
   - Check CPU/Memory utilization

2. Reserved Instances
   - 1-year or 3-year commitment
   - Up to 69% discount

3. Aurora Serverless v2
   - Auto-scales 0 ACU to 256 ACU
     (min 0 ACU auto-pause since 11/2024;
      previously min 0.5, max 128)
   - Pay per ACU-hour

4. Read Replicas
   - Offload reads from primary
   - May reduce primary instance size

DynamoDB Cost Modes

On-Demand:
- Pay per request
- No capacity planning
- Good for: Unpredictable traffic

Provisioned:
- Provision RCU/WCU
- Lower cost if predictable
- Can use Reserved Capacity

Reserved Capacity:
- Upfront payment
- Up to 77% discount
- 1-year or 3-year

6. Cost Management Tools

AWS Cost Explorer

Features:
- Visualize costs over time
- Forecast future spending
- Identify cost drivers
- Savings Plans recommendations

Reports:
- Monthly costs by service
- Daily costs
- Reserved Instance utilization
- Savings Plans utilization

AWS Budgets

BudgetTypes:┌─────────────────────────────────────────────┐│CostBudget:││Alertwhenspendingexceeds$1000││││UsageBudget:││AlertwhenEC2hoursexceed1000││││ReservationBudget:││AlertwhenRIutilization<80%││││SavingsPlansBudget:││AlertwhenSPutilization<80%│└─────────────────────────────────────────────┘Actions:-SendSNSnotification-RunLambdafunction-ApplySCPorIAMpolicy

AWS Cost Anomaly Detection

ML-powereddetection:┌─────────────────────────────────────────────┐│Normalspendingpattern││││████████████████████████││████████████████████████││▲│││Anomalydetected!│││││████████████││████████████││││→Alert:EC2spend300%higherthannormal│└─────────────────────────────────────────────┘

Trusted Advisor

Cost Optimization Checks:
- Idle EC2 instances
- Underutilized EBS volumes
- Unassociated Elastic IPs
- Idle RDS instances
- Low utilization EC2
- Reserved Instance optimization

7. Right-Sizing

Process

1.Collectmetrics(CloudWatch)│▼2.Analyzeutilization-CPU<40%?Downsize-Memory<40%?Downsize│▼3.Testsmallerinstance│▼4.Monitorafterchange│▼5.Repeatregularly

Tools

  • Compute Optimizer: ML recommendations
  • Cost Explorer: Right-sizing recommendations
  • CloudWatch: Custom metrics analysis

Part 3: Sustainability Pillar

Overview

The Sustainability Pillar is the 6th pillar AWS added to the Well-Architected Framework in 2021. It focuses on minimizing the environmental impact of workloads.

┌─────────────────────────────────────────────────────────────┐│SUSTAINABILITYPILLAR││││"Minimizeenvironmentalimpactofrunning││cloudworkloads"││││6BestPracticeAreas:││├──Regionselection││├──Alignmenttodemand││├──Softwareandarchitecture││├──Datamanagement││├──Hardwareandservices││└──Processandculture│└─────────────────────────────────────────────────────────────┘

Design Principles

1. Understand Your Impact

Measure and understand your workload's impact:
- Use the AWS Customer Carbon Footprint Tool
- Monitor resource utilization metrics
- Track energy consumption patterns

2. Establish Sustainability Goals

Set sustainability goals:
- Define sustainability KPIs
- Set improvement targets
- Regular progress reviews

3. Maximize Utilization

Maximize resource utilization:
- Right-size resources
- Avoid over-provisioning
- Use Auto Scaling effectively

4. Anticipate and Adopt New, More Efficient Hardware and Software Offerings

Continuously evaluate and move to more efficient technology:
- Graviton processors (better performance per watt)
- Newer instance generations, purpose-built accelerators (Inferentia, Trainium)
- Design flexibly enough to switch quickly when new offerings arrive

5. Use Managed Services

Share infrastructure to raise average utilization:
- Serverless (Lambda, Fargate), managed DB/analytics
- AWS optimizes operations and utilization at large scale
- Examples: S3 Lifecycle, Auto Scaling, Fargate instead of self-managed EC2

6. Reduce the Downstream Impact of Your Cloud Workloads

Reduce the energy/resources customers need to use your service:
- Reduce payload size, compress data, cache at the edge
- Reduce the need for customers to upgrade their devices
- Measure and test client-side impact (device farm)

These are exactly the 6 design principles in the official whitepaper. Do not confuse them with the 6 best practice areas in the diagram above (Region selection, Alignment to demand, ...).

Best Practices

1. Region Selection

┌─────────────────────────────────────────────────────────────┐│REGIONSUSTAINABILITY││││Factorstoconsider:││├──Carbonintensityofpowergrid││├──Renewableenergyavailability││├──Dataresidencyrequirements││└──Latencytousers││││AWSSustainabilityRegions:││-Stockholm(eu-north-1):100%renewable││-Ireland(eu-west-1):100%renewable││-Frankfurt(eu-central-1):Highrenewable%│└─────────────────────────────────────────────────────────────┘

2. Compute Optimization

┌─────────────────────────────────────────────────────────────┐│EFFICIENTCOMPUTE││││Option│EnergyEfficiency││─────────────────┼─────────────────────││Graviton│Upto60%moreefficient││Fargate│Shared,optimizedinfra││Lambda│Payperuse,noidle││SpotInstances│Usesparecapacity││AutoScaling│Matchdemand,avoidwaste│└─────────────────────────────────────────────────────────────┘GravitonProcessors:-ARM-based,designedbyAWS-Betterperformanceperwatt-Supportedbymostservices-Lowercost+lowercarbon

3. Storage Optimization

DataLifecycleManagement:┌────────────────────────────────────────────────────────────┐│││HOTDATA→WARMDATA→COLDDATA→DELETE││(S3Standard)(S3IA)(Glacier)││││Strategies:││-S3Lifecyclepolicies││-Intelligent-Tiering││-Deleteunuseddata││-Compressdata││-Useefficientformats(Parquet,ORC)│└────────────────────────────────────────────────────────────┘

4. Data Transfer Optimization

MinimizeDataMovement:├──UseCloudFrontcaching├──Compressbeforetransfer├──Batchoperations├──Chooseregionsclosetousers└──UseVPCEndpoints(avoidNAT)

5. Development Practices

SustainableDevelopment:├──Efficientalgorithms├──Optimizedcode├──Removedeadcode├──Usecompiledlanguageswhenpossible├──Asyncprocessingfornon-urgenttasks└──Cachefrequentlyaccesseddata

AWS Tools for Sustainability

1. Customer Carbon Footprint Tool

Dashboard showing:
- Carbon emissions by service
- Emissions by region
- Historical trends
- Forecast emissions

Access: AWS Billing Console → Carbon Footprint

2. Compute Optimizer

Recommendations for:
- EC2 instances (right-sizing)
- EBS volumes
- Lambda functions
- Auto Scaling groups

3. Cost Explorer

Identify waste:
- Unused resources
- Idle instances
- Over-provisioned services

Sustainability Metrics

┌─────────────────────────────────────────────────────────────┐│KEYMETRICS││││ResourceEfficiency:││├──CPUutilization%││├──Memoryutilization%││└──Storageutilization%││││EnvironmentalImpact:││├──Carbonemissions(tCO2e)││├──Energyconsumption(kWh)││└──Resourcespertransaction││││Optimization:││├──Right-sizingsavings││├──Idleresourcereduction││└──Datareductionfromlifecycle│└─────────────────────────────────────────────────────────────┘

Exam Tips

When you see a Sustainability question:

1. EFFICIENCY FIRST
   - Right-size resources
   - Use Auto Scaling
   - Avoid over-provisioning

2. GRAVITON PROCESSORS
   - Better energy efficiency
   - Lower cost
   - ARM-based workloads

3. SERVERLESS = SUSTAINABLE
   - Lambda, Fargate
   - No idle resources
   - Pay only for what you use

4. DATA MANAGEMENT
   - Lifecycle policies
   - Delete unused data
   - Compress and optimize

5. MANAGED SERVICES
   - AWS optimizes infrastructure
   - Better utilization
   - Shared resources

Summary of the 6 Pillars

┌─────────────────────────────────────────────────────────────┐│WELL-ARCHITECTEDFRAMEWORK││6PILLARS││││1.OperationalExcellence││→Automate,Document,Learn││││2.Security││→Protectdata,Leastprivilege││││3.Reliability││→Recoverfromfailures││││4.PerformanceEfficiency││→Useresourcesefficiently││││5.CostOptimization││→Avoidunnecessarycosts││││6.Sustainability││→Minimizeenvironmentalimpact│└─────────────────────────────────────────────────────────────┘

Review Questions

  1. What does "Mechanical sympathy" mean?

    Show answer

    Understanding how hardware and software work at a low level so you choose the right tools. Examples: CPU cache lines → data locality (DynamoDB partition key design), disk seek patterns → sequential vs random I/O (HDD vs SSD vs NVMe), network latency → batch requests instead of individual calls. In the cloud: understand instance families (compute/memory/storage-optimized) to choose correctly, and understand storage I/O patterns to choose the right EBS type.

  2. When should you use io2 vs gp3 for EBS?

    Show answer

    io2 (Block Express): when you need consistent sub-millisecond latency, 99.999% durability, Multi-Attach (io1/io2), or > 80,000 IOPS on a single volume (the gp3 max since 09/2025) — typically demanding database tiers (Oracle, SQL Server, SAP HANA). gp3: most production workloads and boot volumes; configurable IOPS of 3,000-80,000 and throughput up to 2,000 MiB/s, independent of size. gp3 is significantly cheaper than io2 — use io2 only when performance requirements exceed gp3 capabilities.

  3. How many requests per prefix can S3 handle?

    Show answer

    3,500 PUT/COPY/POST/DELETE + 5,500 GET/HEAD per prefix per second. A prefix in S3 is the part of the key path before the last slash. To scale beyond a single prefix: use multiple prefixes (random or hash-based prefixes) to distribute requests. Example: user-photos/2024/01/ and user-photos/2024/02/ are 2 separate prefixes — they do not share a request limit.

  4. How does CloudFront differ from Global Accelerator?

    Show answer

    CloudFront: caches content at Edge Locations, optimized for cacheable HTTP/HTTPS (static assets, video). Global Accelerator: anycast IPs, no caching, optimized for dynamic/non-cacheable traffic (APIs, gaming, IoT, any TCP/UDP). GA also supports HTTP but does not cache. Both use the AWS edge network — GA for low-latency routing, CloudFront for caching + edge compute. GA provides static IPs (useful for firewall whitelisting).

  5. How does the cache-aside pattern work?

    Show answer

    Application code handles caching: (1) Read: check the cache → on a hit: return from cache; on a miss: fetch from the DB → store in the cache with a TTL → return to the client. (2) Write: write to the DB → invalidate the cache entry (or update the cache). The application manages the cache itself — flexible but more code. This contrasts with Write-through (writes update the cache automatically) and Read-through (the cache fetches from the DB itself on a miss). Cache-aside is the most common pattern with ElastiCache Redis.

  6. How do Compute Savings Plans differ from EC2 Instance Savings Plans?

    Show answer

    Compute SP: the most flexible — applies to EC2 (any family/region/OS), Lambda, Fargate. Discount ~66%. EC2 Instance SP: EC2 only, committed to one instance family in a specific Region. Higher discount (~72%) but less flexible. Choose Compute SP when you have mixed workloads (EC2 + Lambda + Fargate) or need the flexibility to change instance families; choose EC2 Instance SP when the EC2 workload is stable and well-defined.

  7. How does S3 Intelligent-Tiering work?

    Show answer

    S3 monitors the access frequency of each object. An object not accessed for 30 days → automatically moved to the Infrequent Access tier (lower storage cost). If it is accessed → moved back to Frequent Access immediately. You can additionally opt in to Archive tiers (90 days, 180 days). There is no retrieval fee when moving between Frequent/Infrequent tiers. There is a monitoring fee (~$0.0025/1000 objects/month) — not worth it for small objects (<128 KB, not monitored).

  8. What advantages does gp3 have over gp2?

    Show answer

    gp3: (1) ~20% cheaper for the same storage size, (2) IOPS independent of size — 3,000 IOPS baseline even for a 1 GB volume (gp2 only gives 3 IOPS/GB), (3) Provisioned IOPS up to 80,000 and throughput of 2,000 MiB/s (since 09/2025; baseline 3,000 IOPS / 125 MiB/s) without increasing size, (4) No complex "burst credit" mechanism like gp2. Migrating from gp2 to gp3 has no downtime — use Elastic Volumes modification.

  9. What actions can AWS Budgets take?

    Show answer

    Budget Actions (automatic): (1) Apply IAM policy — restrict permission to deploy resources when the budget is hit, (2) Attach SCP — block actions at the Organizations level, (3) Target specific EC2/RDS instances — stop instances. Alerts (notifications): email notifications, SNS topics. Budget Actions help enforce cost controls automatically — no manual intervention needed when the budget is exceeded. Combine with SNS → Lambda for custom actions.

  10. Which metrics should right-sizing be based on?

Show answer

(1) CPU utilization — sustained EC2 CPU < 40% → downsize the instance type, (2) Memory utilization — requires the CloudWatch Agent, (3) Network throughput — bandwidth needs, (4) Disk IOPS/throughput — EBS metrics, (5) Application-level metrics — response time, error rate. AWS Compute Optimizer analyzes 14 days of metrics and recommends the optimal instance type with performance + cost trade-offs. Avoid right-sizing based on peak only — look at P95/P99 and average.

  1. Name the design principles of the Sustainability Pillar.
Show answer

6 principles: (1) Understand your impact — measure with the Customer Carbon Footprint Tool, (2) Establish sustainability goals — KPIs and improvement targets, (3) Maximize utilization — right-size, avoid over-provisioning, (4) Anticipate and adopt new, more efficient offerings — Graviton, newer instance generations, (5) Use managed services — shared infrastructure has higher utilization, (6) Reduce the downstream impact — reduce the energy used by end-user devices. The focus differs from Cost Optimization: the goal is to reduce resources consumed, even though many measures overlap.

  1. Why is Graviton often the answer for a "reduce carbon footprint" scenario?
Show answer

Graviton is an ARM-based chip designed by AWS, delivering up to ~60% better performance per watt than comparable x86 — the same workload consumes less energy, and it is also 20-40% cheaper. When a question combines "reduce cost and carbon footprint" for a web tier/container/open-source database, Graviton (m7g/m8g, Fargate Graviton, Aurora Graviton) is almost always the answer. Condition: the app must run on ARM (modern runtimes are fine; legacy x86-only binaries are not).

  1. How does serverless contribute to Sustainability?
Show answer

Lambda/Fargate eliminate idle capacity — resources run only when there are requests, with no servers on 24/7 waiting for traffic. The infrastructure is shared multi-tenant, and AWS optimizes utilization to a much higher level than self-managed EC2 (often <20% utilization). In Well-Architected terms: serverless satisfies both "maximize utilization" and "use managed services" at once. Trade-off: for very high steady-state workloads, EC2 + RI can be more cost-effective.

  1. How does storage lifecycle help reduce environmental impact?
Show answer

Cold data moves to tiers that consume fewer resources (S3 IA → Glacier), and unused data is deleted; combine this with compression and efficient formats (Parquet/ORC reduce both storage size and compute at query time). S3 Lifecycle policies and Intelligent-Tiering automate this — reducing cost (Cost Optimization) and storage energy (Sustainability) at the same time. This is a classic example of one measure serving 2 pillars.

Hands-on Exercises

Part 1: Performance Efficiency Pillar

  • Compare Lambda performance with different memory settings
  • Set up a CloudFront distribution for S3
  • Configure an ElastiCache cluster
  • Create a CloudWatch Dashboard for performance metrics

Part 2: Cost Optimization Pillar

  • Enable Cost Explorer and analyze your costs
  • Create an AWS Budget with an alert
  • Review Trusted Advisor cost recommendations
  • Apply an S3 Lifecycle policy

Part 3: Sustainability Pillar

  1. Customer Carbon Footprint Tool: open AWS Billing Console → Carbon Footprint and view emissions by service/region for your account (or a sandbox account). Note which service emits the most and which region is "greener".

  2. Right-sizing with Compute Optimizer: enable Compute Optimizer and review recommendations for your existing EC2/EBS/Lambda; apply 1 recommendation (downsize or move to Graviton) and estimate the reduction in both cost and energy.

  3. Lifecycle policy: create an S3 Lifecycle rule that moves objects > 30 days old to Standard-IA and > 90 days old to Glacier Flexible Retrieval, plus a rule that deletes incomplete multipart uploads — explain which rule serves Sustainability and which serves Cost.

References


Next lesson →