🐾CloudWatch: More than logs and metrics 🐾
🤓 What comes into your mind when you think about CloudWatch? Most of you would instantly think about logging and monitoring with metrics. But CloudWatch has other brilliant features besides that, and canaries is one of them.
What is canary?
Canaries are automated scripts that run on a schedule to test your application's availability, latency, and functionality. They act like real users by simulating interactions with your website, API, or application endpoints. Canaries can detect issues before customers do, helping you monitor performance and troubleshoot problems proactively.
Canaries are created using CloudWatch Synthetics. They work by executing predefined scripts (written in Node.js or Python) that check your application at regular intervals. They can validate expected responses, measure response times, and capture screenshots or logs for debugging. If a canary detects an issue, CloudWatch alerts you so you can investigate and fix problems before they impact users. You can watch a detailed guideline on how to create Canaries below.
Use cases
Canaries can be useful in the following use cases:
Website Availability Monitoring: A canary pings your homepage every 5 minutes and alerts you if it goes down.
API Health Checks: A canary sends a request to your login API and verifies it returns a 200 status code.
User Journey Testing: A canary logs in to an e-commerce site, adds an item to the cart, and verifies checkout works.
Latency Monitoring: A canary tracks how long it takes for a webpage to load and alerts if it exceeds 3 seconds.
SSL/TLS Certificate Expiry Alerts: A canary checks your HTTPS certificate and notifies you 30 days before it expires.
Thank you for reading, let’s chat 💬
💬
💬
💬
I love hearing from readers 🫶🏻 Please feel free to drop comments, questions, and opinions below👇🏻