Logging and Monitoring in AWS (CloudWatch) - benjamin-s-hobbs/reading-notes GitHub Wiki

Logging and Monitoring

From: Introduction to AWS CloudWatch (accessed by Benjamin Hobbs on 8/1/2023)

  • Amazaon CloudWatch is a service used for real-time monitoring of AWS resources (like EC2 instances, EBS, RDS, load balancers, Lambda, Cognito, S3, etc.) CloudWatch is useful to collect matrices, monitor (and consolidate) log files, and set alarms. CloudWatch can also be used to automate some tasks.

CloudWatch Event

  • Events - generated by JSON script
  • Rules - match incoming events and route them to differents targets for processing. Rules don't have any order for processing. All rules for an event will be processed.
  • Targets - process events and are specified within the rules. Some types:
    • Lambda function
    • Kinesis Stream
    • SNS topic
    • SQS queue
    • SSM Automation
    • SSM OpsItem
    • SSM Run COmmand
    • Step Functions State Machine

CloudWatch Agent

Cloudwatch Alarm

CloudWatch Logs

CloudWatch Anomaly Detection

Questions and Exercises for Understanding

  1. Explain CloudWatch Events to a non-technical friend.
  • Have you ever been stuck somewhere and couldn't watch the big game. For some reason, it wouldn't even stream to your phone...but you could get live updates via Google or ESPN? That's kinda like CloudEvents. A near real-time stream of events, logged in one place that keeps you apprised of what's happening in your environment.
  1. What do CloudWatch Logs helps us achieve?
  • Centralizing logs for ease of auditing and analysis
  1. What capabilities does CloudWatch Anomaly detection have?
  • Behavior-modeling capabilities for certain metrics (basesd on prior data)
  • Calculates an Anomaly Detection band
  • Enables alarm creation to remediate detected anomalies