CloudWatch Logs allows you to ingest logs from your AWS services. The CloudWatch Logs service helps you move logs off your host and onto durable storage. The S3 service backs this durable storage. Once they have moved there, they are retained until you change the retention period.
With logs stored in CloudWatch Logs, you can perform basic text searches across the data stored. You can also create custom metrics and alarms from the data parsed from the logs. CloudWatch Logs can be an essential tool in your security and compliance frameworks, as they allow you to create an audit trail, serve as evidence for forensic analysis, and provide critical information in case of an incident. From the rules, you can impose the usage, access to, and auditability of the logs.
Having gained a basic understanding of the CloudWatch Logs service, you will now learn about some of the key terms.
You should be familiar with some key terms that may appear when working with the CloudWatch service and on the Certified Security Specialty exam:
Figure 8.2: How logs move from AWS resources to CloudWatch Logs
Figure 8.2 shows how the different AWS resources generate the log files that turn into log streams. Those log streams then turn into log groups. The log groups can be part of a subscription that is consumed by other services to be stored in other long-term storage or used for analysis. CloudWatch Logs also has the ability to retain logs for the time period that you specify.
The next section will show you how to save log files indefinitely or for a specific period of time.