Amazon CloudWatch Synthetics
Automated testing with canaries
Create "canaries" — scheduled scripts (built on Lambda, with a headless browser) that check endpoints, APIs, and UI flows to catch errors before users do.
- Cost$ Low
- Difficulty●●●●●
- Costs money when idle?No
- Serverless
- In examsSOA · DVA
Think of it asLike a mystery shopper who visits your store every 5 minutes to try making a purchase.
When to use it
✓ Use it when
You need proactive monitoring of uptime, APIs, or sign-in/checkout flows.
✗ Avoid it when
Want data from real users → CloudWatch RUM.
Common uses
- Check the home page is up every minute
- Test-run the sign-in and ordering flows
- Detect broken links, take screenshots on failure
What does it cost?
- Pricing model: Charged by the number of canary runs; Lambda, S3 for storing results, and logs are billed separately.
⚠️ Cost traps
A canary running every minute for a month adds up to a large number of runs — choose a sensible frequency.