Amazon Web Services - Introduction to Amazon CloudWatch Synthetics
Last Updated :
08 May, 2023
In this article, we will get an introduction to Amazon Cloudwatch Synthetics. With this feature, you can create different kinds of Canaries to continually verify your user experience even when you don't have traffic, monitor and test for unusual behavior, and trace issues to their source for faster resolution.
Let's start by navigating to CloudWatch synthetics.

Amazon CloudWatch synthetics allows you to create configurable scripts called canaries to continuously monitor your application endpoints and APIs. By using canaries you can discover issues with your website before your customers do.
Here we already have two canaries monitoring our sample pet adoption site.

Let's create a third Canary. The canaries can be created from pre-existing blueprints from scripts that can be edited inline or by using a workflow builder or a canary recorder.

For this canary, we'll use the Heartbeat monitoring blueprint. The heartbeat scripts load the specified URL and store a screenshot of the page, an HTTP archive file, and logs of accessed URLs. We'll enter the URL for our sample pet adoption site in this case.

Let's move on without inputting any environment variables.

We'll also retain the default settings for scheduling.

We'll also keep the default timeout settings. If you have specific data retention policies you can change the default settings here to maintain compliance.

Under access permissions, you can choose whether to create a new identity and access management or IAM role that's specific to this canary or use an existing role. We'll create a new role.

You can allow synthetics to create CloudWatch alarms for your canary automatically. Let's add an alarm that will notify us via an Amazon SNS, for if our canary fails two or more times in 15 minutes.

If your endpoint is under a virtual private cloud you can select it here.

CloudWatch synthetics can be integrated with AWS X-ray and CloudWatch service lens service maps. Let's enable the integration and create the canary.

Our heartbeat monitoring canary has been successfully created.
Canaries with tracing enabled also appear on the service map in both CloudWatch service lens and an X-ray. Returning to the top of the page we can select the monitoring tab to view graphs of the CloudWatch metrics published by this canary for the selected time range. The configuration tab details current configuration information for the canary including when it was last modified.

Features:
- Canary Tests: CloudWatch Synthetics allows you to create canary tests that simulate user behavior and test the availability and performance of your applications, APIs, and websites. You can create canary tests using pre-built blueprints or by writing your own custom scripts.
- Monitoring: CloudWatch Synthetics monitors your canary tests in real-time and provides detailed metrics and logs for each test. It also alerts you when a test fails or experiences performance issues.
- Scripting: CloudWatch Synthetics provides a powerful scripting environment that allows you to create custom scripts to test your applications, APIs, and websites. You can use scripting languages such as JavaScript, Python, and PowerShell to write your scripts.
- Integrated with CloudWatch: CloudWatch Synthetics is fully integrated with Amazon CloudWatch, which means that you can use CloudWatch to view and analyze your canary test results alongside other metrics and logs.
- Simple Pricing: CloudWatch Synthetics is offered at a simple, pay-as-you-go pricing model. You only pay for what you use, and there are no upfront costs or minimum fees.
Similar Reads
Amazon Web Services - Introduction to Amazon EKS
Amazon Elastic Kubernetes Service(EKS) is a fully managed service that you can use to run Kubernetes on Amazon Web Service. Kubernetes is open-source software that enables you to install and manage applications at a high scale. Table of ContentWhat is Amazon EKSBenefits of Amazon EKSHow Amazon EKS W
10 min read
Amazon Web Services - Introduction to Amazon FSx
In this article, we will look into Amazon's fully managed native File Server service called Amazon FSx, and it is integrated with the rest of AWS. So what does fully managed mean? It means that you no longer need to manage the hardware or the software to provide File server services to your users. A
5 min read
Amazon Web Services - Introduction to CloudFront CDN
Amazon CloudFront is a global web service that allows you to securely deliver content to your users with low latency and high availability. It does so by further delivering content safely. This service helps to built high performance and security in your application. CloudFront works for both static
3 min read
Amazon Web Services - Introduction to Solutions Constructs
This is an introductory article on AWS Solutions Constructs. If you're not familiar with solution constructs, in short, they're a set of reusable architecture components that allow you to create better infrastructure as code stacks and create them faster. Let's first talk about infrastructure as cod
4 min read
Amazon Web Services - Introduction to Elastic Cache
This article intends to make the readers aware of one of the core services of AWS or Amazon Web Services called the Amazon Elastic Cache. Amazon ElastiCache is a complete caching solution proposed by AWS. It elevates the overall data accessing the experience of a user because of its wide range of mu
5 min read
Introduction to Amazon Web Services
Amazon Web Services (AWS) is one of the world's leading cloud platforms in providing the web services of various domains. AWS follows the trends of digital IT and comes up needy services with optimized performances covering a wide range of services from Compute to Storage. It covers a wider range of
12 min read
Amazon Web Services - Introduction to EC2 Spot Instances
In this article, we will look into the process of profiling your applications and workloads to confirm if they can take advantage of Amazon EC2 spot instances. Spot instances are spare compute capacity available to you at steep discounts (often as much as 90% cheaper) compared to on-demand prices. T
8 min read
Amazon Web Services - Introduction to Cryptographic Computing
Cloud computing presents new opportunities for organizations to obtain valuable insights from their data at scale. This data can be even more useful when combined with data from other parties. But with patient health information, financial transactions, business trade secrets, and other forms of sen
2 min read
Introduction to Amazon CloudWatch
Amazon CloudWatch is a service used for monitoring and observing resources in real-time, built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers. CloudWatch provides users with data and actionable insights to monitor their respective applications, stimulate system-
10 min read
Amazon Web Services - Introduction to Simple Workflow Service
In this article, we are going to discuss one of the important aspects of Amazon AWS, which is called Amazon SWS or SWF. it stands for Amazon simple workflow services. Itâs a part of Amazon Web Services (AWS). AWS a cloud provider server. Which provides services in areas like computing, storage, admi
8 min read