3.5.1.8. User Experience Monitoring and Service-Level Objectives (CloudWatch Synthetics, RUM, Application Signals)
💡 First Principle: Server-side metrics describe the system; users experience the journey. Measure the journey both ways (scripted probes and real sessions), then turn the measurements into a stated objective with an error budget so alerts fire on user impact rather than on noise.
Synthetic vs real user monitoring:
"CloudWatch Synthetics" canaries | "CloudWatch RUM" | |
|---|---|---|
| Traffic | Scripted, scheduled (as often as every minute) | Real user sessions (sampled percentage) |
| Works with zero users | Yes, detects outages at 3 a.m. or before launch | No |
| Sees | Availability, latency, broken links, UI screenshots and visual diffs, multi-step API or browser flows | Page and screen load times, web vitals, JavaScript and HTTP errors, crashes and app hangs, breakdown by browser, device, OS and geography |
| Private endpoints | Canary can run inside a "VPC" | Runs in the user's browser or mobile app |
| How added | Script (Node.js or Python with Playwright, Puppeteer or Selenium, or Java) running as a Lambda function in your account | App monitor plus a JavaScript snippet (web) or ADOT SDK (Android/iOS) |
Use both for a customer-facing application: canaries catch outages and regressions on critical flows (login, checkout) before customers do and right after each deployment, and RUM shows what real customers on real networks see, including problems a canary in one Region never reproduces (one country's CDN edge, an old browser). RUM data is kept 30 days unless copied to CloudWatch Logs. Turning on X-Ray tracing for canaries and RUM links client requests to back-end traces.
Service-level objectives with "CloudWatch Application Signals":
- Application Signals discovers services and their dependencies from OpenTelemetry-compatible instrumentation (CloudWatch agent with ADOT auto-instrumentation on EKS, ECS, EC2 or Lambda) and records latency, request volume, faults and errors per service and operation.
- An SLO = an SLI (Application Signals latency or availability, or any CloudWatch metric or metric math expression) + a threshold + an attainment goal (for example 99.9%) over an interval that is rolling (recent user experience) or calendar (monthly business reporting).
- Period-based SLOs count good versus bad time periods; request-based SLOs count good versus bad requests, which suits spiky traffic.
- Error budget = what the goal allows to fail (99.9% over 30 days is about 43 minutes). Burn rate = observed error rate / (100% - goal); burn rate 1 spends the budget exactly at the end of the interval. Burn-rate alarm thresholds follow from how much budget you tolerate losing: alerting when 5% of a 30-day (720-hour) budget is spent within 1 hour needs a threshold of 5% x 720 / 1 = 36. A burn-rate alarm with a short look-back window and a high threshold pages for fast budget consumption, and a longer window with a lower threshold catches slow leaks. This replaces fragile static thresholds on raw metrics.
- SLO attainment and budgets can feed release decisions: freeze risky deployments while the budget is exhausted.
⚠️ Exam Trap: A canary passing does not prove users are fine, and RUM cannot warn you about an outage while nobody is using the site. "Detect problems before customers report them, including outside business hours" is Synthetics; "measure actual page-load performance by country and browser" is RUM; "alert when we are on track to miss 99.9% this month" is an SLO with a burn-rate alarm, not a static threshold alarm.