Skip to content

CloudWatch Logs

AWS CloudWatch Logs

  • Logs storage architecture:
    • [[Log groups]]: arbitrary name, usually representing an application
    • [[Log stream]]: instances within application / log files / containers
  • Can define log expiration policies (never expire, 30 days, etc)
  • Using the [[AWS CLI]] we can tail CloudWatch logs
  • To send logs to CloudWatch, make sure IAM permissions are correct.
  • Security: [[Encrpyion]] of logs using AWS KMS (Key Management Service) at the [[Group Level]]

CloudWatch Logs Metric Filter & Insights

  • CloudWatch Logs can use [[filter expressions]]

    • For example, find a specific IP inside a log
    • Metric filters can be used to trigger alarms
  • [[CloudWatch Logs Insights]] (new - Nov 2018) can be used to query logs and add queries to CloudWatch Dashboards.