Moving Logs from CloudWatch Logs
Although CloudWatch Logs provides a sustainable logging solution right away, storage can be a little more costly than other solutions for logs that are not being utilized and just need to be kept for compliance purposes. Additionally, the service does not have the ability to search across multiple log groups at the same time. If you need to either cut costs for your log storage or search across multiple streams of logs for trends and anomalies, you will need to move those logs to another storage system.
It all begins with the use of CloudWatch subscription filters. As you will see in the following exercise, subscription filters allow you to push all or a subset of the logs that are coming into the CloudWatch Logs group to a Kinesis Data Firehose stream or a Lambda function, or even export the data to an S3 bucket.
Figure 9.7: Moving log files from CloudWatch Logs to S3
The next section will dive deeper into subscription...