Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS. You can use this service to collect and check metrics, monitor log files, set alarms, and mainly react to changes in your AWS resources. It is used to monitor AWS resources such as Amazon EC2 instances, DynamoDB tables, and RDS DB instances, as well as custom metrics generated by your applications and services.

You can use the CloudWatch to gain system-wide visibility into resource utilisation, application performance, and operational health. It helps you to react quickly and make sure your applications are running smoothly. You can find freelancers to take care of this monitoring once the service is setup.

CloudWatch Pros:

  • It is a feature which is natively available from Amazon
  • You get a quick access via AWS dashboard
  • API provides great potential for customization
  • The Ingest API allows for custom metric integration
  • Easy to scale an AWS environment using the monitoring
  • Allows for SNS notification and automated actions

CloudWatch Cons:

  • It is currently limited to infrastructure-level metrics
  • It retains only 2 weeks of history
  • You can view only one metric at a time

Monitor Amazon EC2:

An EC2 instance is a virtual server in Amazon’s Elastic Compute Cloud environment. The EC2 is a service that allows business subscribers to run application programs in the computing environment. The process of monitoring is simple as even a freelance web developer can monitor the same.

Basic Monitoring for EC2 instances: Seven pre-selected metrics at a five-minute frequency and three statuses check metrics at one-minute frequency, for no additional charge.

Detailed Monitoring for EC2 instances: All metrics available to Basic Monitoring at one-minute frequency, for an additional charge. Instances, where the detailed Monitoring is enabled, allows data aggregation by the EC2 AMI ID and instance type.

The CloudWatch Events delivers a near real-time stream of system events that describe changes in resources to Lambda functions, SNS topics, SQS queues, streams in Amazon Kinesis Streams, or built-in targets. If you set-up simple rules, you can match events and route them to the target functions. CloudWatch Events becomes aware of operational changes as they occur.

 Basic concepts:

Events: Here, an event indicates a change in your environment on the AWS platform. The resources you are using can generate events when their state changes. The CloudTrail publishes events when you are making any API calls. You can generate custom application-level events and publish them to Events.

Targets: A target processes events. Targets include AWS Lambda functions, SNS topics, SQS queues, Kinesis streams, or built-in targets. A target receives events in the JavaScript Object Notation (JSON) format, which is easy to read for humans.

Rules: You can easily set up some rules which can match with the events. The rules will route them to the correct Targets. A single rule can route to multiple targets for processing in parallel. Rules do not have a particular order. It enables different parts of an organisation to process the events that are important for them.

Related AWS Services:

AWS CloudTrail enables you to monitor the calls made to the Events, including calls made by the Management Console, the AWS CLI, and other services. Each log file created by the events contains a few records, depending on how many the number of actions performed.

AWS Identity and Access Management (IAM) securely controls the access to AWS resources for your users. Use IAM to control who can use your AWS resources, what resources they can use, and how they can use them.

Amazon Kinesis Streams enables rapid and continuous data intake and aggregation. The type of data used is mainly related to infrastructure and application logs, social media, market data feeds, and web clickstream.

AWS Lambda enables you to build applications that respond quickly to new information. When you upload your App code as Lambda functions, it runs your code on high-availability infrastructure. Lambda performs all the administration of the computer resources, including server and OS maintenance, automatic scaling, and code monitoring and logging.

Simple Notification Service: Amazon SNS manages to send messages and coordinates subscribing endpoints or clients. You use SNS with CloudWatch to send messages when it reaches an alarm threshold.

Auto Scaling enables you to automatically launch or terminate the EC2 instances based on user-defined policies, health checks, and schedules. You can use ‘Alarm’ with ‘Auto Scaling’ to scale your EC2 instances based on the demand.

Relational Database Service (RDS)

Amazon’s RDS is one of the most commonly used databases and an essential part of many application stacks. It is integrated tightly with CloudWatch, so metrics are available.

CPU: An RDS database runs on its isolated database (DB) instance. Depending on when your heaviest usage times are, you should see a fairly regular daily and weekly pattern to CPU usage emerge.

Disk Usage: DB instances can commission between 5GB and 3TB of capacity, so knowing the total space you are using and at the consumption rate of your application allows you to be secure with the knowledge that your database will not hit a size limit accidently.

Memory Usage: Keeping an eye on your RDS instance’s memory usage can give you an insight into how well optimised your database cache is, providing a direct view into how quickly database queries are executed and thus the availability and speed of your end-user service.

Read/Write Latency and Throughput: Your average read latency, average write latency, average read throughput and average write throughput are the high-level report of the database usage, and it also checks how long it takes for your queries to return.

Enable or Disable Detailed Monitoring for Your Instances

By default, an instance is ‘Enable’ for basic monitoring. You have an option to enable the detailed monitoring. The freelance gigs can also do this job instead of dedicated people to work on this task. After you enable detailed monitoring, the Amazon EC2 console displays monitoring graphs with a 1-minute period for instance.

Once the CloudWatch Monitoring System is set-up, most of the resource monitoring becomes automatic reducing ‘Admin’ efforts to manage your virtual environment.

Kitty Gupta