I want to use Amazon CloudWatch Synthetics to monitor the performance of my website and to check the customer experience.
Short description
Canaries are configurable scripts that run on a schedule to monitor your endpoints and APIs. To create a canary to perform these actions, you can use CloudWatch Synthetics. Then, you can configure those canaries to perform the same actions that your customers do on your website.
The following are common use cases for Synthetics canaries:
- Activate continuous monitoring
- Check for broken or dead links
- Check out flows in your webpages
- Check the availability and latency of your endpoints
- Check the load time data
- Monitor for page load errors
- Provide load latency for application UI
- Publish metrics for failures
- Publish metrics for 2XX, 4XX, and 5XX errors
- Take screenshots of your user interface
Resolution
To use CloudWatch Synthetics to create a canary, complete the following steps:
- Open the Amazon CloudWatch console.
- In the navigation pane, under Application Signals, choose Synthetic Canaries.
- Choose Create Canary, and then choose Use Blueprint. For more information, see Using canary blueprints.
- For blueprints, choose Heartbeat Monitoring Blueprint. For more information, see Heartbeat monitoring.
- Under Canary builder, enter the following information:
For Name, enter a name for your canary.
For Application or endpoint URL, enter the application endpoint URL. Note that when you do this, the website might experience increased traffic.
- Under Schedule, choose the run frequency and retention settings based on your use case.
- Under Data Storage, choose the default Amazon Simple Storage Service (Amazon S3) bucket and AWS Identity and Access Management (IAM) role for your canary. Or, choose the specific S3 bucket and IAM role that you want to use. For more information, see Required roles and permissions for canaries.
- Under CloudWatch alarms - optional, set notifications for your canary. You can launch the canary in an Amazon Virtual Private Cloud (Amazon VPC) to monitor the resources inside the Amazon VPC. For more information, see Running a canary on a VPC.
- Choose Create canary.
You can view the canary run results, logs, screenshots, and the HTTP Archive (HAR) file generated for the run on the Amazon CloudWatch console.