Well-Architected Framework
The AWS Well-Architected Framework is AWS's collection of design principles and best practices, organised into six pillars. It gives teams a shared vocabulary for reviewing a design and finding risks. The free Well-Architected Tool in the console walks you through the questions and records a report.
The six pillars
| Pillar | Key question | Example practices |
|---|---|---|
| Operational excellence | Can we run, monitor and improve it? | IaC, small reversible changes, runbooks, post-incident reviews |
| Security | Are data and systems protected? | Least privilege, traceability (CloudTrail), encryption, security at every layer |
| Reliability | Does it recover from failure and meet demand? | Multi-AZ, automatic recovery, tested backups, scaling, service quotas |
| Performance efficiency | Are resources used efficiently as needs change? | Right instance types, serverless, caching, CDNs, experiments |
| Cost optimisation | Do we deliver value at the lowest price? | Pay for what you use, rightsizing, Savings Plans, cost visibility |
| Sustainability | Are we minimising environmental impact? | High utilisation, efficient hardware (Graviton), managed services, data lifecycle |
There are also lenses that add domain-specific questions (Serverless, SaaS, Machine Learning, Data Analytics...).
General design principles
- Stop guessing capacity needs: scale with demand.
- Test systems at production scale; build and tear down test environments cheaply.
- Automate to make experimentation easier.
- Allow for evolutionary architectures.
- Drive architectures using data (metrics, not opinions).
- Improve through game days (practise failures on purpose).
Model: a Well-Architected checklist scorer
A review is a list of questions with best practices; each unmet practice is a risk, marked high (HRI) or medium (MRI). This scorer computes a score per pillar and lists the high risks first:
checklist = {
"Security": [
("Root user has MFA and no access keys", True, "high"),
("All data stores encrypted at rest", True, "high"),
("CloudTrail enabled in all Regions", False, "high"),
("Least-privilege IAM roles reviewed", False, "medium"),
],
"Reliability": [
("Workload runs in at least two AZs", True, "high"),
("Database has Multi-AZ or replicas", False, "high"),
("Backups are restored in tests", False, "medium"),
],
"Operational excellence": [
("Infrastructure defined as code", True, "medium"),
("Alarms on key business metrics", True, "medium"),
],
"Cost optimisation": [
("Budgets with alerts configured", True, "medium"),
("Resources tagged by owner/project", False, "medium"),
],
"Performance efficiency": [
("Static content served via CDN", True, "medium"),
],
"Sustainability": [
("Non-production stopped outside work hours", False, "medium"),
],
}
risks = []
for pillar, items in checklist.items():
met = sum(ok for _, ok, _ in items)
print(f"{pillar:<23} {met}/{len(items)} {'#' * met}{'.' * (len(items) - met)}")
risks += [(sev, pillar, text) for text, ok, sev in items if not ok]
print("\nHigh risk issues (fix first):")
for sev, pillar, text in sorted(risks):
if sev == "high":
print(f" [{pillar}] {text}")
print(f"Medium risk issues: {sum(1 for r in risks if r[0] == 'medium')}")Security 2/4 ##..
Reliability 1/3 #..
Operational excellence 2/2 ##
Cost optimisation 1/2 #.
Performance efficiency 1/1 #
Sustainability 0/1 .
High risk issues (fix first):
[Reliability] Database has Multi-AZ or replicas
[Security] CloudTrail enabled in all Regions
Medium risk issues: 4
The point of a review is not a perfect score but an improvement plan: fix the high risks, schedule the medium ones, and review again later.
Model: reliability in numbers (RTO, RPO, SLA)
Two numbers drive disaster-recovery design: RTO (recovery time objective: how long can we be down?) and RPO (recovery point objective: how much data can we lose?). The four classic DR strategies trade cost against them:
strategies = [ # name, typical RTO (minutes), typical RPO (minutes), relative cost (example)
("Backup & restore", 24 * 60, 24 * 60, 1),
("Pilot light", 60, 10, 2),
("Warm standby", 10, 1, 4),
("Multi-site active/active", 0.5, 0, 8),
]
def cheapest(rto_needed, rpo_needed):
for name, rto, rpo, cost in strategies: # sorted from cheapest
if rto <= rto_needed and rpo <= rpo_needed:
return name, cost
return "no strategy meets this", None
for app, rto, rpo in [("internal wiki", 48 * 60, 24 * 60), ("online shop", 30, 5), ("payments", 1, 0)]:
name, cost = cheapest(rto, rpo)
print(f"{app:<14} RTO {rto:>5} min, RPO {rpo:>5} min -> {name} (cost x{cost})")internal wiki RTO 2880 min, RPO 1440 min -> Backup & restore (cost x1)
online shop RTO 30 min, RPO 5 min -> Warm standby (cost x4)
payments RTO 1 min, RPO 0 min -> Multi-site active/active (cost x8)
And how availability percentages translate into allowed downtime:
for sla in (99.0, 99.9, 99.95, 99.99, 99.999):
minutes = (1 - sla / 100) * 365 * 24 * 60
print(f"{sla:>7}% -> {minutes:9.1f} min/year ({minutes / 12:6.1f} min/month)") 99.0% -> 5256.0 min/year ( 438.0 min/month)
99.9% -> 525.6 min/year ( 43.8 min/month)
99.95% -> 262.8 min/year ( 21.9 min/month)
99.99% -> 52.6 min/year ( 4.4 min/month)
99.999% -> 5.3 min/year ( 0.4 min/month)
Each extra "nine" cuts allowed downtime by a factor of ten, and usually raises cost and complexity considerably. Choose the target the business really needs.
Test yourself
Which pillar was added most recently to the Well-Architected Framework?
- Security
- Reliability
- Sustainability
- Cost optimisation
A shop can be down for 30 minutes and lose 5 minutes of data. In the model, which DR strategy is the cheapest that fits?
- Backup & restore
- Pilot light
- Warm standby
- Multi-site active/active
What does RPO measure?
- How long recovery takes
- How much data loss (in time) is acceptable
- The monthly cost
- The number of AZs