‫So now let's talk
‫about CloudWatch Synthetics Canary.
‫So the idea is that you have a configurable script
‫and that script is going to be run from CloudWatch
‫and is going to be able to monitor your APIs, your URLs
‫or your websites.
‫And the idea is that you define a script,
‫and this script is going to reproduce programmatically
‫what your customers do.
‫And the idea is that, for example,
‫if your customer goes onto a product webpage
‫and then he clicks and he puts add to cart,
‫goes to the checkout, puts the credit card details
‫and make sure the checkout works, you can test all of this
‫and reproduce it with CloudWatch Synthetics Canary.
‫And the idea is that if somehow this script fails,
‫that means you found an issue and it's good
‫for you to find this issue before your customers do.
‫So the idea is that you can check
‫whether or not some flows are working.
‫We can also check the availability and latency
‫of some endpoints, and you can even store load time data
‫and even take screenshots of the UI.
‫So let's take an example.
‫We have an application deployed in us-east-1,
‫and then we're going to use CloudWatch Synthetics Canary
‫to monitor the application.
‫In case things fail,
‫then a CloudWatch alarm is going to be triggered,
‫which is then going to invoke a Lambda function.
‫And a Lambda function may want to update the DNS record
‫of Route 53 to another instance in us-west-2
‫so that we redirect to a version
‫of the application that we know is working.
‫That's just one way of doing things.
‫So this script that Synthetics Canary can run can be written
‫in Node.js or Python.
‫And on top of it from within Synthetics Canary,
‫you have access to a headless Google Chrome browser.
‫So you can do anything you would do with Google Chrome,
‫Chrome directly from within Synthetics Canary.
‫You can choose to run your script once
‫or on a regular schedule.
‫For example, if you wanted to check the availability
‫of your endpoints.
‫There's also some blueprints that you can leverage.
‫So you have the Heartbeat Monitor to load the URL,
‫store screenshots and an HTTP archive file
‫and make sure that everything is working correctly.
‫The API Canary to test basic read and write functions
‫of REST APIs.
‫You have the Broken Link Checker
‫to check all the links inside of the URL you're testing,
‫making sure none of them actually lead you
‫to a broken link.
‫Visual monitoring to compare a screenshot taken
‫during the canary run
‫with a baseline screenshot that you've taken before.
‫Canary Recorder, which is used
‫with CloudWatch Synthetics Recorder.
‫And it's a way for you to record your actions on a website
‫and then automatically out of it, a script will be generated
‫and then you can run it directly on Synthetics Canary
‫and automatically, the actions will be repeated.
‫And finally, a GUI Workflow Builder.
‫So that's, for example, you can verify
‫that the actions taken on your webpage with, for example,
‫with the login form are working correctly.
‫Okay, so that's it for CloudWatch Synthetics Canary.
‫I hope you liked it and I will see you in the next lecture.