Sub topic 3
Operational Excellence: running and improving workloads
This chapter assumes you know core AWS services such as EC2, S3, IAM and CloudWatch, and that you have seen a multi-tier application deployed and operated. It covers the first pillar of the Well-Architected Framework.
What the pillar asks for
Operational Excellence is the ability to run workloads, gain insight into how they behave, and keep improving the processes that support them. The goal is not a stable system alone. It is a team that can change the system often, safely, and learn from each change.
The pillar's design principles are:
- Perform operations as code, so that infrastructure and runbooks are versioned and repeatable.
- Make frequent, small, reversible changes.
- Refine operations procedures frequently, for example in game days.
- Anticipate failure by running pre-mortems and testing failure scenarios.
- Learn from all operational events and share the lessons.
The working model: organize, prepare, operate, evolve
The framework groups the best practices into four areas. They form a loop, not a one-time checklist.
- Organization: Teams understand business priorities, their own responsibilities and who owns each workload.
- Prepare: You design the workload so that it can be understood from the outside (telemetry), deployed safely, and recovered.
- Operate: You measure outcomes, not only machine health, and respond to events using defined runbooks and playbooks.
- Evolve: You feed lessons from incidents and reviews back into design and procedures.
Applying it to a workload
Suppose the orders API runs on EC2 behind a load balancer. A review would ask questions like these:
- Can you tell, from dashboards, whether customers are able to place orders? A CPU graph does not answer that. A business metric such as orders per minute does.
- Is infrastructure defined in code, for example with AWS CloudFormation, so that a new environment is a deployment and not a manual task?
- Does a deployment pipeline release small changes and roll back automatically if an alarm fires?
- After an incident, does the team write down what happened and change something as a result?
The following CloudWatch alarm tracks a workload-level symptom, which is the kind of signal the pillar prefers over raw resource metrics.
aws cloudwatch put-metric-alarm \
--alarm-name orders-5xx-high \
--namespace AWS/ApplicationELB \
--metric-name HTTPCode_Target_5XX_Count \
--dimensions Name=LoadBalancer,Value=<load-balancer-dimension> \
--statistic Sum \
--period 60 \
--evaluation-periods 3 \
--threshold 10 \
--comparison-operator GreaterThanThreshold \
--treat-missing-data notBreachingReplace <load-balancer-dimension> with the value from your load balancer's ARN, in the form app/name/id.
Common errors
- Monitoring machines, not outcomes. Healthy instances can still serve failing requests.
- Manual changes in production. They cause configuration drift, which makes failures hard to reproduce.
- Large, infrequent releases. Each release carries more risk and is harder to roll back.
- Alarms with no owner or runbook. Whoever receives the alert does not know what to do.
- Incidents without follow-up. The same failure returns because no process changed.
Responsibility
Under the shared responsibility model, AWS runs the underlying facilities, but you operate your own deployments, monitoring and incident response. Managed services reduce operational work, but they do not remove your duty to observe and improve the workload.
Exercise
A team monitors CPU and memory on all instances and has green dashboards, yet customers report failed checkouts. Which Operational Excellence practice are they missing, and what would you add?
Show answer
They lack workload-level, outcome-oriented observability. Add metrics and alarms that reflect customer experience, such as checkout success rate, 5xx error count and latency, plus a runbook for responding when an alarm fires.
Exercise
Why does the pillar recommend frequent, small, reversible changes over large releases?
Show answer
A small change is easier to test, to understand when it fails, and to roll back. Large releases bundle many changes, so a failure is harder to diagnose and recovery is slower and riskier.