The Azure Well-Architected Framework has five pillars: reliability, security, cost optimization, operational excellence, and performance efficiency. Each pillar gives design principles, a numbered checklist, recommendations, and, unusually, the trade-offs it makes with the other pillars, because a choice that helps one often costs another. Sustainability is not a sixth pillar on Azure; it is separate guidance for sustainable workloads, with its own emissions tools. This lesson reviews one patient portal pillar by pillar, and shows two pillars skipped: a connection string in plain app settings that leaked, and hand-made portal changes with no way back.
Difficulty: Advanced · Know this first: Lesson 154, Lesson 147
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 security and operations hops are where skipped checklists turn into a breach and an outage.
Pick how the portal reaches its database, how it is deployed, and how its data tier is built. The verdict lists the pillars at risk and the monthly cost.
Three questions. No score is saved anywhere — this is just you against the material.
Using the Azure framework grows in four levels: knowing the pillars, running the checklist, recording trade-offs and automating checks, and running reviews across subscriptions.
At the basic level you can name the pillars and where sustainability lives.
Where it breaks: assuming the three clouds' frameworks are the same list with different logos.
Try it: Basic
Which checklist prefix belongs to operational excellence?
Now do it: Read the OE checklist for one workload.
At the intermediate level you review a workload against each pillar's checklist.
Try it: Intermediate
Advisor shows no recommendations. Is the workload well-architected?
Now do it: Run both on one workload and compare.
At the advanced level decisions are recorded and enforced.
Try it: Advanced
The review decided "no public network access on databases". How do you keep it true?
Now do it: Assign the built-in policy for SQL public network access in a test subscription.
At the master level the framework shapes the landing zone and every workload.
Trade-off: strict policies at the management group stop drift and occasionally block a legitimate exception, so have a reviewed exemption process.
Try it: Master
A team needs an exception to a deny policy for a legacy app. What is the safe way?
Now do it: Create an exemption with an expiry in a test subscription.
Read-only checks that map to the pillars. They change nothing.
# Advisor recommendations by pillar (Azure CLI category names)
for c in HighAvailability Security Cost Performance OperationalExcellence; do
echo "== $c"; az advisor recommendation list --category $c --query "[].{impact:impact, problem:shortDescription.problem}" -o table
done
# Secrets in plain app settings (look for passwords and connection strings)
az webapp config appsettings list -g rg-portal -n app-portal --query "[?contains(name, 'CONNECTION') || contains(name, 'PASSWORD')].name"
# Policy compliance summary for the subscription
az policy state summarize --query "results.{nonCompliantResources:nonCompliantResources, nonCompliantPolicies:nonCompliantPolicies}"
# Resources with no owner tag (cost optimization: financial responsibility)
az resource list --query "[?tags.owner == null].{name:name, type:type}" -o table
Each pillar's design principles, briefly:
Microsoft revises the wording; read the current pillar pages 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 settings file that left the building.
The app uses managed identity and a private endpoint, Azure Policy denies public network access on SQL servers in the landing zone, secret scanning runs on every repository, and no pillar is skipped in a go-live 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 Azure CLI logged in with Reader on a subscription (az account show should answer).
Type each one, read what it prints, and compare it with the note above it.
List Azure Advisor recommendations for each pillar; the CLI calls reliability "HighAvailability".
for c in HighAvailability Security Cost Performance OperationalExcellence; do
echo "== $c"
az advisor recommendation list --category $c --query "[].{impact:impact, problem:shortDescription.problem}" -o table
doneFind secrets kept in plain app settings (they belong in Key Vault, or nowhere, with managed identity).
az webapp list --query "[].{name:name, rg:resourceGroup}" -o tsv | while read n g; do
az webapp config appsettings list -n "$n" -g "$g" --query "[?contains(name, 'PASSWORD') || contains(name, 'CONNECTION')].name" -o tsv | sed "s/^/$n: /"
doneSummarise policy compliance for the subscription.
az policy state summarize --query "results.{nonCompliantResources:nonCompliantResources, nonCompliantPolicies:nonCompliantPolicies}" -o tableFind resources with no owner tag, the first cost-optimization check.
az resource list --query "[?tags.owner == null].{name:name, type:type, group:resourceGroup}" -o tabletradeoffs.pyThis program scores three designs for the patient portal against Azure's five pillars and lists the trade-offs each one accepts: what it buys for one pillar and what it costs another. It shows why the framework asks you to write trade-offs down, and that sustainability has to be added deliberately because it is not one of the five. Save it as tradeoffs.py, then run it.
# tradeoffs.py
PILLARS = ["reliability", "security", "cost optimization", "operational excellence", "performance efficiency"]
DESIGNS = {
"single zone, SQL login, portal changes": {
"scores": [1, 1, 3, 1, 2],
"accepts": ["cheapest to run, and fails on any zone loss, any leaked file, and any bad manual change"],
},
"zone-redundant, managed identity, Bicep pipeline": {
"scores": [2, 3, 2, 3, 3],
"accepts": ["zone redundancy: reliability bought with about 17% more cost",
"private endpoint: security bought with DNS work for operations"],
},
"plus a geo-replica in a second Region": {
"scores": [3, 3, 1, 2, 3],
"accepts": ["Region-level recovery bought with about 40% more cost and a failover runbook to maintain"],
},
}
SUSTAINABILITY = {"single zone, SQL login, portal changes": "not reviewed",
"zone-redundant, managed identity, Bicep pipeline": "test environments off at night; 60% utilisation target",
"plus a geo-replica in a second Region": "the replica idles most of the time: size it small, scale on failover"}
for name, d in DESIGNS.items():
weakest = min(range(5), key=lambda i: d["scores"][i])
print(name)
print(" " + " ".join(f"{p.split()[0][:5]}:{s}" for p, s in zip(PILLARS, d["scores"])),
f" weakest: {PILLARS[weakest]}")
for t in d["accepts"]:
print(" trade-off:", t)
print(" sustainability guidance (separate on Azure):", SUSTAINABILITY[name])
print()
target = {"reliability": 2, "security": 3, "cost optimization": 2, "operational excellence": 3, "performance efficiency": 2}
fits = [n for n, d in DESIGNS.items() if all(s >= target[p] for p, s in zip(PILLARS, d["scores"]))]
print("designs that meet the portal's targets on every pillar:", fits)
Run it, and you should see this output:
$ python3 tradeoffs.py single zone, SQL login, portal changes relia:1 secur:1 cost:3 opera:1 perfo:2 weakest: reliability trade-off: cheapest to run, and fails on any zone loss, any leaked file, and any bad manual change sustainability guidance (separate on Azure): not reviewed zone-redundant, managed identity, Bicep pipeline relia:2 secur:3 cost:2 opera:3 perfo:3 weakest: reliability trade-off: zone redundancy: reliability bought with about 17% more cost trade-off: private endpoint: security bought with DNS work for operations sustainability guidance (separate on Azure): test environments off at night; 60% utilisation target plus a geo-replica in a second Region relia:3 secur:3 cost:1 opera:2 perfo:3 weakest: cost optimization trade-off: Region-level recovery bought with about 40% more cost and a failover runbook to maintain sustainability guidance (separate on Azure): the replica idles most of the time: size it small, scale on failover designs that meet the portal's targets on every pillar: ['zone-redundant, managed identity, Bicep pipeline']
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/azure-well-architected-framework && cd ~/labs/azure-well-architected-framework) and save this as lab.sh.
#!/usr/bin/env bash
# The Linux steps of "The Azure Well-Architected Framework: Five Pillars, Trade-offs, and Sustainability", 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 Azure Advisor recommendations for each pillar; the CLI calls reliability "HighAvailability".'
'Find secrets kept in plain app settings (they belong in Key Vault, or nowhere, with managed identity).'
'Summarise policy compliance for the subscription.'
'Find resources with no owner tag, the first cost-optimization check.'
)
step_1() {
for c in HighAvailability Security Cost Performance OperationalExcellence; do
echo "== $c"
az advisor recommendation list --category $c --query "[].{impact:impact, problem:shortDescription.problem}" -o table
done
}
step_2() {
az webapp list --query "[].{name:name, rg:resourceGroup}" -o tsv | while read n g; do
az webapp config appsettings list -n "$n" -g "$g" --query "[?contains(name, 'PASSWORD') || contains(name, 'CONNECTION')].name" -o tsv | sed "s/^/$n: /"
done
}
step_3() {
az policy state summarize --query "results.{nonCompliantResources:nonCompliantResources, nonCompliantPolicies:nonCompliantPolicies}" -o table
}
step_4() {
az resource list --query "[?tags.owner == null].{name:name, type:type, group:resourceGroup}" -o 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.
sed, echo, Pipes, Loops, If...Else.A hospital group moves 12 patient-facing applications to Azure over a year. Design how the Well-Architected Framework is applied, from landing zone to go-live.
Which decisions go into the landing zone as policy, and which are per workload? Who runs reviews and when? How are trade-offs recorded? How do Advisor and Defender findings reach owners? How is sustainability included, given it is not a pillar?
Say 12 applications, 3 of them critical, highly confidential health data, a 99.95% target in clinic hours, and one platform team of six.
Cloud Adoption Framework landing zones with management-group policies (no public data endpoints, required tags, allowed Regions, diagnostic settings); per workload, a review against the five checklists before go-live and yearly, with the assessment score tracked; decision records for trade-offs; Advisor and Defender findings routed by tag to owners with response times; managed identity and private endpoints as the default pattern; sustainability guidance applied in the review template with emissions reviewed next to cost.
Strict landing-zone policy slows the first migrations and stops repeated mistakes; reviewing all 12 deeply takes the platform team months, so critical apps get deep reviews and others a template; zone redundancy everywhere is costly, so it follows each app's target.
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 |
|---|---|---|---|
| Security skipped | Hop 3: Security | Breaks | Security is deferred. The app reaches Azure SQL with a SQL login whose connection string sits in plain app settings, and the server allows public access from "Azure services and resources". A developer's exported settings file ends up in a public repository. |
| Operations skipped | Hop 5: Operational excellence | Breaks | Operations is skipped: there is no pipeline, and changes are made in the portal. A night-shift engineer edits an app setting to fix a reporting job and replaces the database connection value. Bookings fail from 22:40. |
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.