How do I monitor the performance of my website using CloudWatch Synthetics?

3 minute read

I want to monitor the performance of my website and check the customer experience. How can I use Amazon CloudWatch Synthetics to monitor my website?

Short description

You can use CloudWatch Synthetics to create a canary for your website. Canaries are configurable scripts that run on a schedule to monitor your endpoints and APIs. You can configure canaries to perform the same actions that your customers do on your website. This means that you can monitor your customer experience, and proactively find issues before your customer does.

Canaries have several uses. You can check the availability and latency of your endpoints, load time data, and you can take screenshots of your user interface. You can also use canaries to publish metrics for failures and for 2XX, 4XX and 5XX errors, and to enable continuous monitoring.

Some common uses for Synthetics canaries include:

  • Monitor for page load errors
  • Provide load latency for application UI
  • Check out flows in your webpages
  • Check for broken or dead links


Monitor the health of your application of website using Synthetics

Use these steps to create a canary using the CloudWatch Synthetics console:

  1. Open the Amazon CloudWatch console.
  2. In the navigation pane, choose Synthetic Canaries.
  3. Choose Create Canary, and then choose Use Blueprint. Blueprints allow you to create canaries for common tasks, such as loading a webpage.
  4. To monitor the availability of your website, choose Heartbeat Monitoring Blueprint. This blueprint periodically loads a single URL to check the availability and latency of your website. It also captures a screenshot of the UI.
  5. Enter a name for your canary.
  6. Enter the application endpoint URL. This can be an HTTPS or HTTP endpoint. Be sure that you own or have permission to monitor the website, because that website might experience increased traffic.
  7. Choose the Run frequency and Retention settings based on your use case.
  8. 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 users who manage CloudWatch canaries.
  9. Choose CloudWatch alarm, and set notifications for your canary. You can choose to be notified if there are any availability issues in your endpoint. You can also configure the canary to monitor resources inside a Virtual Private Cloud (VPC) by launching it in a VPC. For more information, see Running a canary in a VPC.
  10. After you have configured the canary settings, choose Create canary. This also creates the IAM roles, S3 buckets, CloudWatch alarms, the canary's AWS Lambda function, and CloudWatch log groups.
  11. After your canary is created, navigate to the Canary detail page to view the canary run results, logs, screenshots, and the HAR generated for the run.

Related information

Canary blueprints

Required roles and permissions for canaries

Running a canary in a VPC

AWS OFFICIALUpdated 2 years ago