SkillSprout
Chapter 13 · Lesson 4
Intermediate
6 min read

Operational Excellence

Overview

The Operational Excellence pillar is about running and monitoring systems to deliver business value and continually improving your processes. It is the "how do we actually operate this thing?" pillar: deployments, monitoring, incident response and learning from mistakes.

The core idea is to treat operations like software. Infrastructure is defined as code, changes are small and automated, runbooks are scripted and every incident feeds back into better procedures. That replaces fragile hand-built servers and heroic midnight fixes with repeatable, reviewable processes.

For the SAA-C03 exam you need to recognise the AWS services that enable this: CloudFormation for infrastructure as code, Systems Manager for operations tasks, CloudWatch, CloudTrail and X-Ray for observability and Config for compliance and drift detection.

Key Concepts

  • Design principles: perform operations as code, make frequent small reversible changes, refine operations procedures frequently, anticipate failure, learn from all operational failures.
  • Four areas: Organization, Prepare, Operate, Evolve.
  • CloudFormation / CDK / Terraform define infrastructure as code; drift detection finds manual changes.
  • Systems Manager provides Session Manager, Run Command, Patch Manager, Automation, Parameter Store and State Manager without SSH or bastions.
  • Observability means metrics (CloudWatch), logs (CloudWatch Logs), traces (X-Ray), events (EventBridge) and audit (CloudTrail).
  • AWS Config records resource configuration over time and evaluates compliance rules; CloudTrail records API calls.
  • Safe deployment strategies: rolling, immutable, blue/green, canary, linear with automatic rollback on alarms.
  • Runbooks (routine procedures) and playbooks (investigating unknown issues) should be automated where possible, for example with SSM Automation.

Detailed Notes

Four focus areas

  1. Organization: understand business priorities, teams own what they build, clear responsibilities, a supportive culture.
  2. Prepare: design for observability, use infrastructure as code, automate deployments, mitigate deployment risk and run operational readiness reviews.
  3. Operate: understand workload health using KPIs and metrics, understand operational health, respond to events with runbooks and alerting that is actionable.
  4. Evolve: learn from experience, run post-incident reviews, share lessons and improve continuously.

Observability stack

SignalServiceNotes
MetricsCloudWatch Metrics, alarms, dashboardsStandard EC2 metrics every 5 min, detailed every 1 min; custom metrics up to 1-second resolution
LogsCloudWatch Logs, Logs InsightsMetric filters, subscription filters to Lambda/Kinesis/OpenSearch
TracesAWS X-Ray, CloudWatch Application SignalsService map, latency analysis
EventsEventBridgeRoute AWS and custom events to targets, schedule tasks
AuditCloudTrailWho did what, when; org trails to S3
Config stateAWS ConfigTimeline of config changes and compliance rules
HealthAWS Health DashboardService events affecting your account

Operations as code

bash
# Preview changes before applying them
aws cloudformation create-change-set \
  --stack-name web-prod --change-set-name release-42 \
  --template-body file://web.yaml --capabilities CAPABILITY_IAM
aws cloudformation describe-change-set \
  --stack-name web-prod --change-set-name release-42
aws cloudformation execute-change-set \
  --stack-name web-prod --change-set-name release-42
  • Change sets preview impact; stack policies protect critical resources; StackSets deploy across accounts and Regions; drift detection reports manual changes.
  • AWS Service Catalog offers approved, pre-configured products to teams.

Deployment strategies

StrategyHowDowntimeRollbackCost
All-at-onceUpdate everything togetherYesRedeployLowest
RollingBatches of instancesReduced capacitySlowLow
Rolling with additional batchExtra batch keeps capacityNoneSlowSlightly higher
ImmutableNew ASG, then swapNoneFast (delete new)Higher temporarily
Blue/GreenFull parallel environment, switch DNS/ALBNoneInstantDouble during cutover
Canary / LinearShift a small % then moreNoneFastModerate

AWS CodeDeploy supports in-place and blue/green for EC2/on-premises, and canary/linear for Lambda and ECS, with automatic rollback on CloudWatch alarms. CodePipeline orchestrates CI/CD.

Systems Manager essentials

CapabilityUse
Session ManagerShell access without SSH keys, open ports or bastions; sessions logged to S3/CloudWatch
Run CommandRun scripts on fleets at scale
Patch ManagerScheduled patching with maintenance windows
AutomationRunbooks as code (for example, restart and snapshot)
Parameter StoreHierarchical config and secrets (Secrets Manager for rotation)
State Manager / InventoryDesired state and software inventory

Operational readiness and incident response

  • Define SLIs/SLOs and alarm on symptoms customers feel, not only on CPU.
  • Use EventBridge + Lambda/SSM Automation for auto-remediation (for example, reattach a security group or restart a service).
  • Run post-incident reviews (blameless) and store lessons in a shared knowledge base.
  • Use Config rules, conformance packs and AWS Organizations for governance at scale; use AWS Health events to plan around AWS maintenance.

Real World Example

Scenario — a retailer eliminating risky Friday-night releases.

An online retailer deploys its monolith manually over SSH. A mis-typed command during a peak sale took the checkout down for 40 minutes. The new platform team makes everything code: VPCs, ALB, ASGs and databases are described in CloudFormation (with change sets reviewed in pull requests); the pipeline in CodePipeline builds an AMI and deploys with CodeDeploy blue/green.

Each release shifts 10% of traffic to the new environment (canary), and CloudWatch alarms on 5xx errors and p99 latency trigger an automatic rollback. SSH is disabled; engineers use Session Manager with all sessions logged to S3. Patch Manager patches monthly during a maintenance window. EventBridge rules trigger SSM Automation to restart unhealthy services and open a ticket.

Deployments now occur 15 times a day during business hours, and a failed release rolls back in under two minutes.

Architecture Diagram

Operations as code pipeline with observability
Architecture
AWS Cloud
Developerspull request
CloudFormationchange sets
Blue / Greencanary 10%
ALB
CloudWatchmetrics, logs, alarms
CloudTrail
Config
EventBridge
Systems ManagerAutomation runbook

Code is built, deployed with safe strategies and observed; events drive automated remediation.

  1. 1Infrastructure and application changes are reviewed as code and previewed with CloudFormation change sets.
  2. 2The pipeline deploys using blue/green or canary, shifting a small share of traffic first.
  3. 3CloudWatch, CloudTrail and Config capture metrics, logs, API calls and configuration changes.
  4. 4An alarm triggers EventBridge, which starts an SSM Automation runbook or rolls the deployment back.

Best Practices

  • ✓Define all infrastructure as code and review changes through pull requests and change sets.
  • ✓Make small, frequent, reversible changes and use blue/green or canary with automatic rollback.
  • ✓Build observability in from the start: metrics, structured logs, traces, dashboards and actionable alarms.
  • ✓Eliminate SSH and bastions: use Session Manager with session logging.
  • ✓Automate routine tasks with SSM Automation and EventBridge auto-remediation.
  • ✓Use Config rules and drift detection to find unmanaged changes.
  • ✓Run blameless post-incident reviews and update runbooks.
  • ✓Use Organizations and Service Catalog to give teams guardrails with autonomy.

Common Interview Questions

Exam Tips

SAA-C03 focus

  • "Infrastructure as code, repeatable environments across accounts/Regions" -> CloudFormation (StackSets).
  • "Preview effect of a stack update" -> change set; "detect manual changes" -> drift detection.
  • "Who deleted the resource / API activity" -> CloudTrail; "configuration history and compliance" -> Config.
  • "Shell access without SSH/bastion, audited" -> Systems Manager Session Manager.
  • "Zero downtime with instant rollback" -> blue/green; "gradual traffic shift" -> canary/linear.
  • "Automatically remediate non-compliant resources" -> Config rule + SSM Automation (or EventBridge + Lambda).
  • "Patch fleet on a schedule" -> Systems Manager Patch Manager with a maintenance window.
  • "Trace requests across microservices" -> AWS X-Ray.

Finished this lesson?

0 of 64 lessons done · 0% of the course