Amazon CloudWatch Synthetics enables you to create canaries to monitor your endpoints and APIs. Canaries are configurable scripts that follow the same routes and perform the same actions as a customer. This enables the outside-in view of your customers’ experiences, and your service’s availability from their point of view.
If your account has been provisioned for you by AWS for the purpose of completing this lab, you will need to skip this section of the lab.
Navigate to CloudWatch Synthetics
Create Canary
Click on Create Canary
Select GUI workflow builder
Enter lab-login-canary for Name
Enter [Application URL]/users/sign_in as the Application or endpoint URL you are testing
Under Workflow builder:
[id='user_email']
in the selector input[id='user_password']
in the selector input[name='commit']
in the selector input[href='../../users/sign_out']
in the selector inputToggle Enable thresholds for this canary
Click Create canary
Note: This operation may take up to a minute. Please be patient while it completes.
Explore the Summary, Availability graph and Screenshots. Try clicking on HAR File to view request information and Logs to view execution information. This canary is testing your login process.
Generate a failure
Create an Alarm
Resolve the failure
View the results
You have used CloudWatch Synthetics to detect issues in your application workflow. In this case, you have created a workflow to detect issues with the login process from the customer perspective.