AWS CloudWatch

Amazon CloudWatch is a service that monitors AWS Cloud resources and applications running on AWS. It collects and tracks metrics, collects and monitors log files, and sets alarms. Amazon CloudWatch has a basic level of monitoring for no cost and a more detailed level of monitoring for an additional cost.

AWS Identity and Access Management
  • Amazon CloudWatch offers either basic or detailed monitoring for supported AWS products.
    • Basic monitoring sends data points to Amazon CloudWatch every five minutes for a limited number of preselected metrics at no charge.
    • Detailed monitoring sends data points to Amazon CloudWatch every minute and allows data aggregation for an additional charge.
  • If you want to use detailed monitoring, you must enable it—basic is the default.
  • Amazon CloudWatch supports monitoring and specific metrics for most AWS Cloud services including:
    • Auto Scaling
    • Amazon CloudFront
    • Amazon CloudSearch
    • Amazon DynamoDB
    • Amazon EC2
    • Amazon EC2 Container Service (Amazon ECS)
    • Amazon ElastiCache
    • Amazon Elastic Block Store (Amazon EBS)
    • Elastic Load Balancing
    • Amazon Elastic MapReduce (Amazon EMR)
    • Amazon Elasticsearch Service
    • Amazon Kinesis Streams
    • Amazon Kinesis Firehose
    • AWS Lambda
    • Amazon Machine Learning
    • AWS OpsWorks
    • Amazon Redshift
    • Amazon Relational Database Service (Amazon RDS)
    • Amazon Route 53
    • Amazon SNS
    • Amazon Simple Queue Service (Amazon SQS)
    • Amazon S3
    • AWS Simple Workflow Service (Amazon SWF)
    • AWS Storage Gateway
    • AWS WAF
    • Amazon WorkSpaces.

You may have an application that leverages Amazon DynamoDB, and you want to know when read requests reach a certain threshold and alert yourself with an email. You can do this by using ProvisionedReadCapacityUnits for the Amazon DynamoDB table for which you want to set an alarm.

  • Amazon CloudWatch metrics can be retrieved by performing a GET request. When you use detailed monitoring, you can also aggregate metrics across a length of time you specify.
  • Amazon CloudWatch does not aggregate data across regions but can aggregate across Availability Zones within a region.
  • AWS provides a rich set of metrics included with each service, but you can also define custom metrics to monitor resources and events AWS does not have visibility into. —for example, Amazon EC2 instance memory consumption and disk metrics that are visible to the operating system of the Amazon EC2 instance but not visible to AWS or application-specific thresholds running on instances that are not known to AWS.
  • Amazon CloudWatch supports an Application Programming Interface (API) that allows programs and scripts to PUT metrics into Amazon CloudWatch as name-value pairs that can then be used to create events and trigger alarms in the same manner as the default Amazon CloudWatch metrics.
  • Amazon CloudWatch Logs can be used to monitor, store, and access log files from Amazon EC2 instances, AWS CloudTrail, and other sources.
  • Amazon CloudWatch Logs can also be used to store your logs in Amazon S3 or Amazon Glacier.
  • Logs can be retained indefinitely or according to an aging policy that will delete older logs as no longer needed.
  • A CloudWatch Logs agent is available that provides an automated way to send log data to CloudWatch Logs for Amazon EC2 instances running Amazon Linux or Ubuntu. You can use the Amazon CloudWatch Logs agent installer on an existing Amazon EC2 instance to install and configure the CloudWatch Logs agent. After installation is complete, the agent confirms that it has started and it stays running until you disable it.
  • Each AWS account is limited to 5,000 alarms per AWS account, and metrics data is retained for two weeks (14 days) by default (at the time of this writing). If you want to keep the data longer, you will need to move the logs to a persistent store like Amazon S3 or Amazon Glacier.

Quiz: AWS CloudWatch