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)
- Architecture selection — choose suitable patterns and services (evaluate options, use managed services, decide based on data/benchmarks)
- Compute and hardware — instance type/family, Graviton, accelerators, container vs serverless, elasticity
- Data management — choose data stores by access pattern (relational, key-value, in-memory, analytics), caching, partitioning
- Networking and content delivery — location (Region, Local Zones), CloudFront, Global Accelerator, protocols, load balancing
- 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
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
EC2 Instance Type Selection
| Workload | Instance Family | Why |
|---|---|---|
| Web servers | M (General) | Balanced |
| Batch processing | C (Compute) | High CPU |
| In-memory cache | R (Memory) | High RAM |
| Data warehouse | I (Storage) | High I/O |
| Machine Learning | P, G | GPU |
| Variable load | T (Burstable) | Cost-effective |
Lambda Optimization
4. Storage Selection
Storage Decision Matrix
| Characteristic | S3 | EBS | EFS | FSx |
|---|---|---|---|---|
| Access | Object | Block | File | File |
| Latency | ms | sub-ms | ms | sub-ms |
| Durability | 11 9s | 99.999% | 11 9s | varies |
| Sharing | Unlimited | Single EC2 | Multi EC2 | Multi EC2 |
EBS Volume Types
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
Database Performance Patterns
| Pattern | Solution | Use Case |
|---|---|---|
| Read replicas | Aurora, RDS | Read-heavy |
| Caching | ElastiCache | Frequent reads |
| Sharding | DynamoDB | High throughput |
| Connection pooling | RDS Proxy | Many connections |
Caching Strategy
6. Network Selection
CloudFront Optimization
Global Accelerator vs CloudFront
| Feature | CloudFront | Global Accelerator |
|---|---|---|
| Content | Static + Dynamic | TCP/UDP traffic |
| Caching | Yes | No |
| Use case | Web content | Gaming, IoT, VoIP |
| Entry points | Edge locations | Edge 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
| Layer | Metrics |
|---|---|
| Compute | CPU, Memory, Network |
| Storage | IOPS, Throughput, Latency |
| Database | Connections, Query time |
| Network | Latency, Packet loss |
| Application | Response time, Error rate |
CloudWatch Dashboards
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
- Practice Cloud Financial Management
- Expenditure and Usage Awareness
- Cost-Effective Resources
- Manage Demand and Supply Resources
- Optimize Over Time
2. Design Principles
1. Implement Cloud Financial Management
2. Adopt a consumption model
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
5. Analyze and attribute expenditure
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
| Aspect | Reserved Instance | Savings Plans |
|---|---|---|
| Commitment | Specific instance | $ amount/hour |
| Flexibility | Limited | High |
| Services | EC2, RDS, etc. | EC2, Lambda, Fargate |
| Discount | Up to 72% | Up to 72% |
| Best for | Stable workloads | Flexible 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
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
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
AWS Cost Anomaly Detection
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
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.
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
2. Compute Optimization
3. Storage Optimization
4. Data Transfer Optimization
5. Development Practices
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
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
Review Questions
-
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.
-
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.
-
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/anduser-photos/2024/02/are 2 separate prefixes — they do not share a request limit. -
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).
-
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.
-
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.
-
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).
-
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.
-
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.
-
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.
- 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.
- 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).
- 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.
- 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
-
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".
-
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.
-
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
- gp3 up to 64 TiB / 80,000 IOPS / 2,000 MiB/s (09/2025)
- Performance Efficiency Pillar — 5 best practice areas
- Amazon CloudFront
- Amazon ElastiCache
- AWS Global Accelerator
- AWS Compute Optimizer
- Cost Optimization Pillar
- AWS Cost Explorer
- AWS Budgets
- AWS Trusted Advisor
- Savings Plans
- Sustainability Pillar
- Design principles for sustainability in the cloud
- Best practices for sustainability (6 areas)
- AWS Customer Carbon Footprint Tool
- AWS Graviton Processors