The AWS Well-Architected Framework is AWS's checklist for asking whether a workload is built well, in six pillars: operational excellence, security, reliability, performance efficiency, cost optimization, and sustainability. Each pillar has design principles and review questions; the AWS Well-Architected Tool turns the questions into a review that records high- and medium-risk issues and an improvement plan. This lesson reviews one orders service pillar by pillar before launch, and shows what happens when a pillar is skipped: a single-zone database that takes the shop down for nine hours, and a fleet sized for a peak that never came.
Difficulty: Advanced · Know this first: Lesson 153, Lesson 145
By the end of this lesson you can work at four levels:
This page teaches it with a plain-language analogy, an animated diagram with normal and failure scenarios, a simulator, a quiz, basic, intermediate, advanced, and master checks, the expert detail ("Go deeper"), a production incident, a hands-on lab with commands and their output, and a production design exercise.
This bar adds up hours of review work for one workload. It is a worked example, not a measurement. The reliability and cost hops are where a skipped pillar turns into an outage or a bill.
Pick how the database and the compute are deployed, and how often the workload is reviewed. The workload loses about $40,000 an hour when orders are down.
Three questions. No score is saved anywhere — this is just you against the material.
Using the AWS framework grows in four levels: knowing the pillars, running a review, fixing what it finds, and running reviews across an organisation.
At the basic level you can name the pillars and the question each one asks.
Where it breaks: treating the framework as a certification instead of a set of questions.
Try it: Basic
Which pillar asks "how do you test recovery procedures?"
Now do it: Read the reliability pillar's design principles.
At the intermediate level you run a review with the team that owns the workload.
Try it: Intermediate
A question does not apply to the workload. What do you do?
Now do it: Run the review on one workload with its owners.
At the advanced level reviews lead to changes, and checks run continuously.
Try it: Advanced
How do you stop a fixed risk from coming back?
Now do it: Turn one HRI into a Config rule.
At the master level the framework is how the organisation designs, not an event.
Trade-off: reviews take a day or two of senior time per workload, and catch the failures that cost far more.
Try it: Master
You have 80 workloads and 6 reviewers. How do you scale reviews?
Now do it: Draft a custom lens with your three most important standards.
The review through the API: list risks and improvements for a workload, and save a milestone. Run these with read access first; create-milestone writes to the Tool only, not to the workload.
aws wellarchitected list-workloads --query "WorkloadSummaries[].[WorkloadName,WorkloadId,RiskCounts]" aws wellarchitected get-lens-review --workload-id $WID --lens-alias wellarchitected \ --query "LensReview.PillarReviewSummaries[].[PillarName,RiskCounts]" aws wellarchitected list-lens-review-improvements --workload-id $WID --lens-alias wellarchitected \ --query "ImprovementSummaries[?Risk=='HIGH'].[PillarId,QuestionTitle]" --output table aws wellarchitected create-milestone --workload-id $WID --milestone-name launch \ --client-request-token "$(uuidgen)"
The design principles in one line each:
AWS revises the framework and its wording from time to time; read the current version before a review. How the three clouds' frameworks line up:
| AWS | Azure | Google Cloud | |
|---|---|---|---|
| Framework | AWS Well-Architected Framework | Azure Well-Architected Framework | Google Cloud Well-Architected Framework (called the Architecture Framework until 2024) |
| Pillars | Six: operational excellence, security, reliability, performance efficiency, cost optimization, sustainability | Five: reliability, security, cost optimization, operational excellence, performance efficiency; sustainability is separate guidance | Six: operational excellence; security, privacy, and compliance; reliability; cost optimization; performance optimization; sustainability |
| Inside each pillar | Design principles, best practices, and review questions | Design principles, a checklist, recommendations, and trade-offs with the other pillars | Principles and recommendations |
| Specialised guidance | Lenses (for example serverless, SaaS, machine learning, generative AI) | Workload guidance (for example AI, mission-critical, SaaS) and service guides per Azure service | Perspectives (for example AI and ML, financial services) |
| Review tool | AWS Well-Architected Tool: questions per pillar, high- and medium-risk issues, milestones, an API | Azure Well-Architected Review, an assessment in Microsoft Assessments, with a score and recommendations per pillar | No separate review tool; the framework's recommendations, Architecture Center, and Active Assist |
| Automated recommendations | Trusted Advisor (the number of checks depends on the support plan), Compute Optimizer | Azure Advisor, grouped by reliability, security, performance, cost, and operational excellence, with an Advisor score | Active Assist: Recommender (rightsizing, idle resources, IAM) and insights |
| Carbon data | Customer Carbon Footprint Tool | Emissions Impact Dashboard; carbon optimization in the portal | Carbon Footprint, with export to BigQuery; low-carbon indicators per region |
| Policy and guardrails | Organizations service control policies, AWS Config rules and conformance packs | Azure Policy, initiatives, management groups | Organization Policy, constraints, folders |
| Landing zone guidance | AWS Control Tower, the Landing Zone Accelerator | Cloud Adoption Framework Azure landing zones | Google Cloud setup checklist and enterprise foundations blueprint |
Where they differ, not just in names: Azure keeps sustainability out of its five pillars and in separate guidance; Google Cloud folds privacy and compliance into its security pillar; AWS has the most formal review process (questions, risk levels, milestones) in its own tool. The ideas line up closely; the services and the detail do not, so review a workload against the framework of the cloud it runs on, and use the others for ideas.
This is a composite of a failure pattern that keeps repeating; the details are illustrative. The pillar that was "for later".
The database is Multi-AZ, restores are rehearsed every quarter, launches are blocked while any high-risk issue is open, and no pillar may be left unanswered in a pre-launch review.
Everything here runs on any Linux machine: your own laptop, WSL on Windows (run wsl --install in PowerShell once), or a small cloud VM. The Python needs only Python 3 and its standard library; check that you have it with python3 --version.
Before you start: The AWS CLI v2 with read access to an account (aws sts get-caller-identity should answer). A workload defined in the Well-Architected Tool for the review steps; the other steps work in any account.
Type each one, read what it prints, and compare it with the note above it.
List the workloads defined in the Well-Architected Tool, with their risk counts.
aws wellarchitected list-workloads --query "WorkloadSummaries[].[WorkloadName,WorkloadId,RiskCounts]" --output json
Find the reliability pillar's most common high-risk issue: databases in one Availability Zone.
aws rds describe-db-instances --query "DBInstances[].[DBInstanceIdentifier,Engine,MultiAZ]" --output table
Find long-lived access keys, a frequent security finding.
aws iam list-users --query "Users[].UserName" --output text | tr "\t" "\n" | while read u; do aws iam list-access-keys --user-name "$u" --query "AccessKeyMetadata[].[UserName,AccessKeyId,CreateDate,Status]" --output text done
Check the cost pillar's first practice: is there a budget with an alert?
aws budgets describe-budgets --account-id "$(aws sts get-caller-identity --query Account --output text)" --query "Budgets[].[BudgetName,BudgetLimit.Amount,BudgetLimit.Unit]" --output table
waf_review.pyThis program runs a small Well-Architected review: each pillar's questions have best practices marked present or missing, missing ones become high or medium risks, an unanswered pillar shows up as unanswered rather than safe, and the improvement plan orders the risks by impact and effort. Save it as waf_review.py, then run it.
# waf_review.py
REVIEW = { # pillar: [(question, best practice, in place?, risk if missing, effort 1-3)]
"Operational excellence": [("How do you deploy changes?", "small, reversible, automated deployments", True, "MEDIUM", 2)],
"Security": [("How do you manage identities for workloads?", "no long-lived access keys", False, "HIGH", 1),
("How do you protect data at rest?", "encryption with KMS on every store", True, "HIGH", 1)],
"Reliability": None, # skipped "to save time"
"Performance efficiency": [("How do you select compute?", "load tested at peak", True, "MEDIUM", 2)],
"Cost optimization": [("How do you govern usage?", "budgets with alerts", False, "HIGH", 1),
("How do you match supply to demand?", "autoscaling", False, "MEDIUM", 2)],
"Sustainability": [("How do you take advantage of utilisation?", "utilisation above 50% on average", False, "MEDIUM", 2)],
}
IMPACT = {"HIGH": 3, "MEDIUM": 2}
risks, counts = [], {"HIGH": 0, "MEDIUM": 0, "NONE": 0, "UNANSWERED": 0}
for pillar, questions in REVIEW.items():
if questions is None:
counts["UNANSWERED"] += 1
print(f"{pillar:<24} UNANSWERED: no risks recorded, which does not mean none exist")
continue
for q, practice, present, level, effort in questions:
if present:
counts["NONE"] += 1
else:
counts[level] += 1
risks.append((IMPACT[level] / effort, level, pillar, practice, effort))
found = [r for r in risks if r[2] == pillar]
print(f"{pillar:<24} {len(found)} risk(s)" + (": " + "; ".join(f"{r[1]} {r[3]}" for r in found) if found else ""))
print()
print("risk counts:", counts)
print("launch:", "BLOCKED" if counts["HIGH"] or counts["UNANSWERED"] else "allowed",
f"({counts['HIGH']} high-risk issues, {counts['UNANSWERED']} pillar unanswered)")
print()
print("improvement plan, highest impact per unit of effort first:")
for i, (score, level, pillar, practice, effort) in enumerate(sorted(risks, reverse=True), 1):
print(f" {i}. [{level:<6}] {pillar}: {practice} (effort {effort})")
Run it, and you should see this output:
$ python3 waf_review.py
Operational excellence 0 risk(s)
Security 1 risk(s): HIGH no long-lived access keys
Reliability UNANSWERED: no risks recorded, which does not mean none exist
Performance efficiency 0 risk(s)
Cost optimization 2 risk(s): HIGH budgets with alerts; MEDIUM autoscaling
Sustainability 1 risk(s): MEDIUM utilisation above 50% on average
risk counts: {'HIGH': 2, 'MEDIUM': 2, 'NONE': 3, 'UNANSWERED': 1}
launch: BLOCKED (2 high-risk issues, 1 pillar unanswered)
improvement plan, highest impact per unit of effort first:
1. [HIGH ] Security: no long-lived access keys (effort 1)
2. [HIGH ] Cost optimization: budgets with alerts (effort 1)
3. [MEDIUM] Sustainability: utilisation above 50% on average (effort 2)
4. [MEDIUM] Cost optimization: autoscaling (effort 2)
The same Linux steps, made into a real script you can keep and run again. It uses the Bash features a production script needs: functions (one per step), an array of step names, arguments to choose steps, a case for options, exit codes recorded for each step, and a trap that prints a summary even when you stop it with Ctrl+C. Make a folder for this lesson (mkdir -p ~/labs/aws-well-architected-framework && cd ~/labs/aws-well-architected-framework) and save this as lab.sh.
#!/usr/bin/env bash
# The Linux steps of "The AWS Well-Architected Framework: Six Pillars and a Real Review", as one script (save it as lab.sh).
#
# ./lab.sh run every step, in order
# ./lab.sh 2 4 run only steps 2 and 4
# ./lab.sh --list list the steps
#
# The steps share one shell, so a later step can use what an earlier one set up (a folder,
# a variable, a container): run them all in order the first time. Your own scripts should
# start with "set -euo pipefail"; this one runs teaching commands, and some of them fail on
# purpose, so it records each step's exit code instead of stopping at the first failure.
STEPS=(
'List the workloads defined in the Well-Architected Tool, with their risk counts.'
'Find the reliability pillar'\''s most common high-risk issue: databases in one Availability Zone.'
'Find long-lived access keys, a frequent security finding.'
'Check the cost pillar'\''s first practice: is there a budget with an alert?'
)
step_1() {
aws wellarchitected list-workloads --query "WorkloadSummaries[].[WorkloadName,WorkloadId,RiskCounts]" --output json
}
step_2() {
aws rds describe-db-instances --query "DBInstances[].[DBInstanceIdentifier,Engine,MultiAZ]" --output table
}
step_3() {
aws iam list-users --query "Users[].UserName" --output text | tr "\t" "\n" | while read u; do
aws iam list-access-keys --user-name "$u" --query "AccessKeyMetadata[].[UserName,AccessKeyId,CreateDate,Status]" --output text
done
}
step_4() {
aws budgets describe-budgets --account-id "$(aws sts get-caller-identity --query Account --output text)" --query "Budgets[].[BudgetName,BudgetLimit.Amount,BudgetLimit.Unit]" --output table
}
# print a step that has to be run by hand, instead of running it
by_hand() {
echo " (run this one yourself: $1)"
sed 's/^/ /'
}
RESULTS=()
run_step() {
local n=$1 start=$SECONDS code
printf '\n== step %d of %d: %s\n' "$n" "${#STEPS[@]}" "${STEPS[n-1]}"
"step_$n"
code=$?
RESULTS+=("step $n: exit code $code, $((SECONDS - start)) s")
}
summary() {
echo
echo "== summary"
local r
for r in "${RESULTS[@]}"; do echo " $r"; done
}
case "${1:-}" in
-h|--help) sed -n '2,6p' "$0"; exit 0 ;;
--list) for i in "${!STEPS[@]}"; do echo "$((i + 1)). ${STEPS[i]}"; done; exit 0 ;;
esac
[ $# -eq 0 ] && set -- $(seq 1 "${#STEPS[@]}")
for n in "$@"; do
if ! [[ $n =~ ^[0-9]+$ ]] || (( n < 1 || n > ${#STEPS[@]} )); then
echo "there is no step '$n'; try --list" >&2
exit 2
fi
done
trap summary EXIT
trap 'echo; echo "stopped with Ctrl+C"; exit 130' INT
for n in "$@"; do run_step "$n"; done
Then make it executable and run it:
chmod +x lab.sh ./lab.sh --list # the steps ./lab.sh # every step, then a summary of exit codes and times ./lab.sh 2 3 # only steps 2 and 3
New to a feature used above? These W3Schools pages explain each one from zero, with examples you can run in the browser.
tr, Pipes, Loops.Your company runs 40 workloads on AWS and has never reviewed any of them. Design a Well-Architected review programme for the next year.
Which workloads go first, and why? Who runs reviews, and who answers? Which lenses apply? What blocks a launch? How are risks tracked and reported? How do fixes become guardrails?
Say 40 workloads, 8 business-critical, 4 senior engineers with a day a week each for reviews, and launches about twice a month.
Rank workloads by business impact and change rate; review the 8 critical ones in the first quarter with their teams; a review template with shared answers for the landing zone; lenses where they fit; HRIs pulled into the team trackers through the API; launches blocked while HRIs are open; quarterly milestones for critical workloads; recurring HRIs turned into Config rules, SCPs, or pipeline checks; a monthly report of open HRIs by pillar.
Reviews cost senior time and slow some launches; templates speed them up and can hide workload-specific risks; blocking launches on HRIs creates pressure to mark things not applicable, so reviewers check the reasons.
Each row is one way this system went wrong in the diagram's scenarios. The hop number is where to look first.
| Scenario | Where | Effect | What goes wrong |
|---|---|---|---|
| Reliability skipped | Hop 4: Reliability | Breaks | The reliability questions are skipped to meet the launch date. Three weeks after launch, an event in the Availability Zone that hosts the single RDS instance makes it unreachable. There is no standby; the last snapshot restore has never been tried. |
| Cost and sustainability skipped | Hop 6: Cost optimization | Breaks | The cost questions are deferred. The ECS service runs 24 large tasks around the clock, sized for a peak four times the real one, RDS is an instance size larger than needed, and logs keep forever with no lifecycle rule. |
| Cost and sustainability skipped | Hop 7: Sustainability | Degrades | Deferred with cost; idle tasks and unbounded logs. |
Review the design in this lesson, or your own, against these ten areas. Tick an area when you can answer its question with evidence: a number, a test, a document, or an owner. Your ticks stay in this browser.
The official documentation and standards behind this lesson. Versions and defaults change; when a command or field here differs from them, trust the official page.
Last updated . Next review due by November 2027. Found something out of date? Tell me.