Log groups and log streams

  1. In the CloudWatch navigation pane, expand Logs and choose Log Management (1). Filter by /fcj/cloudwatch-workshop (2) and open the log group /fcj/cloudwatch-workshop/var/log/messages (3).

Log groups

  1. The Log streams tab lists one stream per instance, named by instance ID (1). Open one of them.

Log streams

  1. You see the system log of the instance: systemd, amazon-ssm-agent and other services (1). Use the filter box to search, for example ssm.

Log events

  1. Go back to the log group. By default logs never expire, which costs money over time. Choose Actions (1), then Edit retention setting (2).

Edit retention setting

  1. Set Expire events after to 1 week (7 days) (1) and choose Save (2).

Retention setting

  1. A banner confirms the change (1).

Retention updated