Well-Architected Framework Overview
Well-Architected Framework Overview
The AWS Well-Architected Framework helps cloud architects build secure, high-performing, resilient, and efficient infrastructure.
The Six Pillars
┌─────────────────────────────────────────────────────────────┐
│ Well-Architected Framework │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. Operational Excellence │
│ Focus on running and monitoring systems │
│ │
│ 2. Security │
│ Protect data, systems, and assets │
│ │
│ 3. Reliability │
│ Recover from failures, meet demand │
│ │
│ 4. Performance Efficiency │
│ Use computing resources efficiently │
│ │
│ 5. Cost Optimization │
│ Avoid unnecessary costs │
│ │
│ 6. Sustainability │
│ Minimize environmental impact │
│ │
└─────────────────────────────────────────────────────────────┘
Well-Architected Tool
# Create a workload
aws wellarchitected create-workload \
--workload-name my-workload \
--description "My application workload" \
--environments '[{"environmentType": "PRODUCTION", "name": "prod"}]' \
--aws-regions us-east-1
# List lenses
aws wellarchitected list-lenses
# Get milestone
aws wellarchitected get-milestone \
--workload-id xxx \
--milestone-number 1
Operational Excellence
Pillar 1: Operational Excellence
Design Principles
- Perform operations as code
- Make frequent, small, reversible changes
- Refine operations procedures frequently
- Anticipate failure
- Learn from operational failures
Best Practices
# Use CloudFormation for infrastructure
aws cloudformation deploy --template-file template.yaml --stack-name my-stack
# Implement CI/CD
aws codepipeline create-pipeline --pipeline file://pipeline.json
# Enable CloudTrail for auditing
aws cloudtrail create-trail --name audit-trail --s3-bucket-name my-logs
# Use Systems Manager for automation
aws ssm start-automation-execution \
--document-name AWS-UpdateSSMAgent \
--parameters '[{"InstanceIds": ["i-xxx"]}]'
Key Services
| Service | Purpose |
|---|---|
| CloudFormation | Infrastructure as Code |
| CodePipeline | CI/CD automation |
| Systems Manager | Operations management |
| CloudTrail | API auditing |
| CloudWatch | Monitoring and observability |
| X-Ray | Distributed tracing |
Security
Pillar 2: Security
Design Principles
- Implement a strong identity foundation
- Maintain traceability
- Secure all layers
- Automate security best practices
- Protect data in transit and at rest
- Prepare for security events
Security Checklist
# Enable MFA on root account
aws iam enable-mfa-device --user-name root --serial-number arn:aws:iam::xxx:mfa/root
# Use IAM roles instead of access keys
aws iam attach-role-policy --role-name EC2Role --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
# Enable GuardDuty
aws guardduty create-detector --enable
# Enable Security Hub
aws securityhub enable-security-hub
# Enable Config
aws configservice put-configuration-recorder --configuration-recorder '{"name": "default", "recordingGroup": {"allSupported": true}}'
Security Services
| Service | Purpose |
|---|---|
| IAM | Identity and access management |
| KMS | Key management and encryption |
| WAF | Web application firewall |
| Shield | DDoS protection |
| GuardDuty | Threat detection |
| Inspector | Vulnerability assessment |
| Secrets Manager | Secret management |
| Security Hub | Security posture dashboard |
Reliability
Pillar 3: Reliability
Design Principles
- Automatically recover from failure
- Test recovery procedures
- Scale horizontally to increase availability
- Stop guessing capacity
- Manage change in automation
Reliability Patterns
# Multi-AZ deployment
aws rds create-db-instance --multi-az
# Auto Scaling
aws autoscaling create-auto-scaling-group --min-size 2 --max-size 10
# Load balancing
aws elbv2 create-load-balancer --type application --subnets subnet-xxx subnet-yyy
# Health checks
aws elbv2 create-target-group --health-check-path /health
# Route 53 failover
aws route53 change-resource-record-sets --change-batch failover.json
Reliability Architecture
┌─────────────────────────────────────────────────────────────┐
│ High Availability Design │
├─────────────────────────────────────────────────────────────┤
│ │
│ Route 53 (Health checks + Failover) │
│ │ │
│ ▼ │
│ ALB (Multi-AZ) │
│ │ │
│ ├──▶ AZ-1: EC2 + EBS │
│ ├──▶ AZ-2: EC2 + EBS │
│ └──▶ AZ-3: EC2 + EBS │
│ │
│ RDS (Multi-AZ with Auto-Failover) │
│ ElastiCache (Multi-AZ Replication) │
│ S3 (11 9's durability) │
└─────────────────────────────────────────────────────────────┘
Performance Efficiency
Pillar 4: Performance Efficiency
Design Principles
- Use advanced, cloud-native technologies
- Go global in minutes
- Use serverless architectures
- Experiment more often
- Consider the community
Performance Optimization
# Right-size instances
aws compute-optimizer get-ec2-instance-recommendations
# Use Graviton processors (20% better price-performance)
aws ec2 run-instances --instance-type t4g.micro
# Enable Auto Scaling
aws application-autoscaling register-scalable-target
# Use ElastiCache for caching
aws elasticache create-cache-cluster --engine redis --cache-node-type cache.t3.micro
# Use CloudFront for CDN
aws cloudfront create-distribution --origins '{"Items": [{"DomainName": "my-bucket.s3.amazonaws.com"}]}'
Performance Services
| Service | Purpose |
|---|---|
| CloudFront | Content delivery network |
| ElastiCache | In-memory caching |
| Auto Scaling | Automatic scaling |
| Lambda | Serverless compute |
| DynamoDB Accelerator | DynamoDB caching |
| Global Accelerator | Network acceleration |
Cost Optimization and Sustainability
Pillars 5 & 6: Cost Optimization and Sustainability
Cost Optimization Principles
- Implement cloud financial management
- Measure efficiency consumption
- Stop spending money on undifferentiated heavy lifting
- Analyze and attribute expenditure
Sustainability Principles
- Understand impact
- Maximize utilization
- Anticipate and adopt new hardware
- Use managed services
- Reduce downstream impact
Cost and Sustainability Best Practices
# Use Spot Instances (up to 90% savings)
aws ec2 run-instances --instance-market-options '{"MarketType": "spot"}'
# Use Reserved Instances (up to 75% savings)
aws ec2 purchase-reserved-instances-offering --instance-count 1 --instance-type m5.large
# Use Serverless (pay only for what you use)
aws lambda create-function --runtime python3.12 --handler handler
# Right-size resources
aws compute-optimizer get-ec2-instance-recommendations
# Use Graviton (better performance per watt)
aws ec2 run-instances --instance-type t4g.micro
# Set lifecycle policies
aws s3api put-bucket-lifecycle-configuration --bucket my-bucket --lifecycle-configuration '{"Rules": [{"Transitions": [{"Days": 30, "StorageClass": "GLACIER"}]}]}'
Sustainability Services
| Service | Impact |
|---|---|
| Graviton | 60% less energy |
| Lambda | No idle resources |
| S3 Intelligent-Tiering | Optimize storage |
| Auto Scaling | Match demand |